Draft
Align docs terminology and runtime file references with current architecture#1
Conversation
Copilot created this pull request from a session on behalf of
MIK-HEAL
June 4, 2026 06:50
View session
MIK-HEAL
approved these changes
Jun 4, 2026
Copilot stopped work on behalf of
MIK-HEAL due to an error
June 4, 2026 06:59
MIK-HEAL
added a commit
that referenced
this pull request
Jun 19, 2026
…ntation Phase 1 – Data Integrity & Architecture Foundation ------------------------------------------------- - #8: Created injectable DatabaseContext (SQLite + Drizzle wrapper) with createDatabaseContext() and createTestDatabaseContext() factories; kept default singleton for backward compatibility. - #9: Removed private static instance + getInstance() from EventBus; made constructor public; added createEventBus() factory; exported defaultEventBus and updated all 6 call sites. - #2: Removed parseIdList() compatibility layer (DB is already normalized via join tables); cleaned up call sites in sync-gate-evaluate.ts (7 uses), write-permit.ts, and sync-gate-service.ts; merged duplicate parseRelatedFileLocators. Phase 2 – Complexity Reduction ------------------------------ - #1: Simplified SyncGate state machine: states 9→5 (removed PARTIALLY_ACKED, ESCALATED, TIMED_OUT, BYPASS_REQUESTED) and strategies 5→2 (removed MAJORITY_VETO, OWNER_OVERRIDE, HUMAN_REQUIRED). Replaced state transitions with escalated: boolean flag; simplified evaluateGateLiveness(), transitions, and calculation functions. - #4: Refactored evaluateWriteDecision: collapsed 8 overlapping checks into 4 clear pipeline functions (validateResources, checkExternalConflicts, checkConstraintRuntime, checkAuthorization); merged duplicate "authorization" and "operation" blockers. - #5: Removed _registered booleans from both plugins; isCodePluginRegistered() and isGenericAgentPluginRegistered() now use the registry as source of truth; removed _resetCodePlugin() and _resetGenericAgentPlugin() in favor of clearValidatorRegistry(). Phase 3/4 – Documentation & Cleanup ----------------------------------- - #10: Moved function-parser.ts from syncpoint-kernel to syncpoint-plugin-code (optional feature); removed from kernel public API; migrated tests. - #11: Fixed config enum naming mismatches: L1_audit/L2_warn/L3_block → L0_audit/L1_controlled/L2_editor_guard/L3_proxy; updated CONFIG.md; verified actual L2 implementation in guarded-editor.ts and L3 in file-permission-guard.ts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The docs had drifted from the codebase: several runtime terms and file references no longer matched current implementation names. This PR updates core documentation pages in
docs/so architecture and runtime docs describe the system as it exists today.Terminology alignment
Architecture reference corrections
docs/ARCHITECTURE.mdto current source files (reality-projection*,constraint-evaluation*,state-snapshot).Context Snapshot, formerly Context Capsule).Reality runtime doc synchronization
docs/reality-runtime.mdwith current core/server paths.Example of the reference updates: