Skip to content

Move the omp passes and the kit store to Effect #296

Done

Description

@DocksDocks

Goal

Child of #290. Move the omp sync passes to Effect, with typed errors in the error channel: engine-native/ompFileDeploy.ts, ompKitPlugin.ts, ompPlugins.ts, ompRemovals.ts, ompYaml.ts (its merge stays a plain function with a typed parse failure), and ompChild.ts. Calls into the process layer, the atomic writer, and the kit store, which a later child of #290 moves, go through the bridge rule of the #290 Research. Remove the bridges that the seam child put around these passes. Keep the deployed bytes, the goldens, and idempotency unchanged.

Yolo: the user delegated every decision except the merge to the agent.

Mode: plan-and-implement

Research

Repository facts (main at ab33f4f, after #294, #295, #304):

  • The pass modules are synchronous node:fs code, except ompPlugins.ts (syncPlugins, installedPluginsFromCli, runPluginCommand, retireMarketplacePlugins are async) and ompChild.ts spawnOmp, which returns the Promise of exec.ts spawnProcess. ompYaml.ts merges stay plain functions and throw four Error values whose texts tests assert (cli/test/unit/contract-omp-yaml.test.ts).
  • ompSync.ts wraps every pass in a bridge from Move the engine seam and the sync orchestration to Effect #294: bridgeSync around ompPaths, ensureDirectory, both syncWholeFile calls, both YAML merges, both removals, and syncKitPlugin; bridgePromise around syncPlugins. The bunBootstrap bridge belongs to Move the toolchain passes to Effect #298 and stays.
  • Other callers: tidy.ts bridges ensureDirectory; ompRemovals.ts calls backupPrivateFile; ompKitPlugin.ts calls ensureDirectory and atomicWrite.ts replaceFile; ompFileDeploy.ts calls replaceFile for the merged YAML (it writes through a symlinked config.yml); cli/src/commands/root.ts calls ompPaths for the root tier toggles; ompPlugins.ts calls failures.ts recordFailure when an omp plugin command fails.
  • ompFileDeploy.ts chmods after each write, copy, and directory creation, because a creation mode does not change an existing path. The order of the passes is observable: whole files, config merge then prune, models merge then prune (the first change makes the only backup), kit plugin write before its stale-file prune, plugin retirement before marketplace removal, and the plugin link last.
  • ompPaths.ts resolves the XDG data root with existsSync and falls back to the config root. .agents/skills/omp-sync-context/SKILL.md line 77 says that resolution stays env plus existsSync.
  • Tests: ompKitPlugin.test.ts, ompPluginInventory.test.ts, ompRemovals.test.ts, ompYamlMerge.test.ts, ompBashPatterns.test.ts, contract-omp-yaml.test.ts, ompFastMode.test.ts, ompPaths.test.ts, syncLock.test.ts, rootFlags.test.ts, and both golden suites, which pin the sync output and the deployed tree.

Tool facts: the pins of package.json and bun.lock (Bun 1.4.5 in CI, effect 4.1.7, yaml 2.9.1, Vitest 5.1.2, @effect/tsgo 0.74.1, oxlint 1.95.0). Host prerequisites of the rows: the set that AGENTS.md Testing lists, plus docks-kit on PATH for the omp-smoke row (.agents/skills/verify/SKILL.md; the row runs from the worktree with its docks-kit launcher first on PATH). Local versions on Ubuntu 26.04.1, each resolved with which and readlink -f and read with dpkg-query -W, plus node --version and git --version (2026-12-02): Node v26.13.0 (Vitest); Git 2.53.0 with full history and origin/main; bash 5.3-2ubuntu1 (launcher); /bin/sh is dash 0.5.12-12ubuntu3 (stub scripts); mv from gnu-coreutils 9.7-3ubuntu2.1; du, dirname, and uname from rust-coreutils 0.10.0-1ubuntu2~26.04.1; ps from procps 4.0.4-9ubuntu1; tar 1.35+dfsg-4ubuntu0.4; gpg 2.4.8-4ubuntu3.1; script from bsdutils 2.41.3-3ubuntu2.2; and the omp verified pin 19.2.1 of SoT/toolchain.json (omp --version). The gate row is the repository's standard check (bun run check); this plan adds no command, tool, or test environment to it, and CI provisions it on the runner images that .github/workflows/parity.yml names, so this plan records only the tools of the rows it adds or changes. Rejected: a per-command inventory of the gate's transitive host tools, which changes with every unrelated test and is the subject of #305 (proposal V7).

Effect facts: effect/FileSystem has makeDirectory (with mode), chmod, writeFileString (with mode), copyFile, exists, readFileString, lstat, readDirectory, realPath, and remove; a failure is a PlatformError whose cause holds the Node error and its errno code (node_modules/@effect/platform-node-shared/src/internal/utils.ts). effect/Result has succeed and fail for a plain function with a typed failure. FileSystem.exists returns false only for NotFound and fails on any other error (FileSystem.ts), while existsSync returns false on every error. readFileString decodes with TextDecoder, which strips a leading UTF-8 BOM; tidy.ts readTextKeepingBom (#304) reads bytes and keeps it. The yaml 2.9.1 serializer throws when it emits an alias before its anchor (src/nodes/Alias.ts), which a merge or a prune can cause.

Decisions:

  • Signal guard (delegated, one line; from code review round 1): the signal state, exitOnSignal, deferSignalExit, signalExitPoint, and mutationRegion live in a new module cli/src/engine-native/signalGuard.ts with no import of the passes, which cli/src/engine.ts, cli/src/main.ts, cli/src/commands/tidy.ts, cli/src/engine-native/tidy.ts (its applyTidy uses the same guard as the CLI entry points), and the passes import, and cli/src/engine.ts keeps no copy; so the passes do not import the public CLI seam.
  • Files (delegated, one line): every direct node:fs call of the seven modules goes through FileSystem with the same outcome, the chmod after each write, copy, and directory creation included. Each existence probe keeps the existsSync outcome (every failure counts as absent), and the marketplace registry read keeps its own rule (ENOENT and ENOTDIR mean missing, any other error warns). Every text read that a comparison or a parser uses keeps a leading BOM through a shared reader in a new module cli/src/engine-native/fileText.ts that reads bytes, decodes them with the BOM kept, and keeps the typed PlatformError of a failed read; the tidy call sites keep their optional recovery on top of it, the registry read keeps its errno rule, and the whole-file, YAML, and manifest reads keep propagating a read failure. A call that FileSystem lacks or misreports (the empty-folder removal of the kit plugin prune, and the file removal of a stale plugin file, whose FileSystem.remove adapter in Bun 1.4.5 reports EPERM as EFAULT) uses Effect.try over its node:fs call, which the parent bridges row allows. Calls into the Move the process layer, the file helpers, and the kit store to Effect #297 modules atomicWrite.ts and exec.ts, and the dependency probes of ompPlugins.ts (deps.probe("omp") and deps.probe("git"), Move the toolchain passes to Effect #298), go through bridgeSync or bridgePromise; The logger calls of the moved passes, also the indirect ones through recordFailure and deps.warnMissing, go through bridgeSync, because the logger still rethrows a sink error other than EPIPE until Move the process layer, the file helpers, and the kit store to Effect #297 (parent Logger failures decision).
  • Mutation regions (delegated, one line): each started mutation (a write or copy with its chmod, a directory creation with its chmod, each file or empty-folder removal, and each replaceFile call) runs as one uninterruptible region inside deferSignalExit of cli/src/engine-native/signalGuard.ts (moved from cli/src/engine.ts, Move tidy to Effect #295), so neither a programmatic interrupt nor a handled signal ends the run between a write and its chmod or during a removal, and the locks stay held until the mutation settles; interruption and the signal exit stay possible between mutations. The raw golden channel of cli/src/main.ts uses the same deferral, so exitOnSignal and deferSignalExit take the exit code per signal: the public channel keeps 130 for both signals, and the raw channel keeps 130 for SIGINT and 143 for SIGTERM.
  • YAML (delegated, one line): mergeOmpConfig and mergeOmpModels stay plain functions and return an effect/Result with a typed OmpYamlInvalid failure that keeps each current message, and a serialization throw of the merge or of the prune (ompRemovals.ts) becomes a typed failure with the library's message; ompSync.ts, index.ts, and cli/src/engine.ts carry the new failures to the same CLI output as the bridge failure did.
  • Paths (delegated, one line): ompPaths becomes an Effect over the shared target-following existence probe pathExists of fileText.ts (a FileSystem.stat whose failure counts as absent, as existsSync; code review round 1) with the same fallback; the path math stays plain; ompSync.ts, commands/root.ts, and the tests move with it, and the skill line that names existsSync names pathExists.
  • Bridges (delegated, one line): ompSync.ts calls the moved passes directly and keeps only the bridges into Move the process layer, the file helpers, and the kit store to Effect #297 and Move the toolchain passes to Effect #298 code; tidy.ts yields the Effect ensureDirectory without its old bridge, and cli/src/commands/tidy.ts widens its failure type for it.
  • Failure model (delegated, one line): the writes of the passes are the whole-file deploys, the backups, the merged and pruned YAML (replaceFile, atomic), the kit plugin files and their stale-file prune, the plugin commands, and the upgrade-log removal; each keeps its base crash behavior (a non-atomic whole-file write can be partial after a crash, as now), its retry behavior (a sync run again converges, the goldens prove idempotency), and its order; a failure of one pass keeps the base ledger and exit code.
  • Version: no bump; the output, the exit codes, and the deployed bytes do not change.

Steps

# Id Task Files Depends Effect Status Done when
1 passes Move the seven modules as the decisions say, remove their bridges in ompSync.ts, move every caller, and port the tests that call these APIs cli/src/engine-native/ompFileDeploy.ts, cli/src/engine-native/ompKitPlugin.ts, cli/src/engine-native/ompPlugins.ts, cli/src/engine-native/ompRemovals.ts, cli/src/engine-native/ompYaml.ts, cli/src/engine-native/ompChild.ts, cli/src/engine-native/ompPaths.ts, cli/src/engine-native/ompSync.ts, cli/src/engine-native/index.ts, cli/src/engine.ts, cli/src/main.ts, cli/src/engine-native/fileText.ts, cli/src/engine-native/tidy.ts, cli/src/engine-native/tidyReport.ts, cli/src/commands/tidy.ts, cli/src/engine-native/ompFastMode.ts, cli/src/commands/root.ts, .agents/skills/verify/scripts/omp-smoke.ts, cli/test/unit/syncPipelineFailure.test.ts, cli/test/unit/syncSignals.test.ts, cli/test/lib/signalSelfPreload.ts, cli/test/unit/ompKitPlugin.test.ts, cli/test/unit/ompPluginInventory.test.ts, cli/test/unit/ompRemovals.test.ts, cli/test/unit/ompYamlMerge.test.ts, cli/test/unit/ompBashPatterns.test.ts, cli/test/unit/contract-omp-yaml.test.ts, cli/test/unit/ompFastMode.test.ts, cli/test/unit/ompPaths.test.ts, cli/test/unit/syncLock.test.ts - local done the unit, goldens, scan, and bridges rows pass
2 guidance Update the existsSync rule and the pass pointers of omp-sync-context, the throwing YAML contract of yaml-merge.md (the merges return a Result), the bridge list of dispatch-flow.md (the five omp pass modules are Effect code; only #297 and #298 calls and logger calls are bridged), the ledger paragraph of dispatch-flow.md (recordFailure of the plugin pass runs through bridgeSync until #297, not Effect.sync), the three signal descriptions of sync-orchestration-context (a signal exits at once, except inside a started mutation, which deferSignalExit lets settle first), and the ensureDirectory and ompPaths anchors of other skills that name the old synchronous forms .agents/skills/omp-sync-context/SKILL.md, .agents/skills/omp-sync-context/references/yaml-merge.md, .agents/skills/sync-orchestration-context/SKILL.md, .agents/skills/sync-orchestration-context/references/dispatch-flow.md, .agents/skills/engine-native-context/SKILL.md 1 local done the guidance row passes
3 repairs Repair code review round 1: a target-following existence probe (as existsSync, also on Windows), the backup-time existence probe of the whole-file deploy, the signal state and mutationRegion in a new dependency-neutral module that cli/src/engine.ts and the passes import, a typed unlinkSync inside Effect.try for stale plugin files (the second native exception: the FileSystem.remove adapter of Bun 1.4.5 reports EPERM as EFAULT), the upgrade-log recovery boundary, the guidance texts, and the test fixes of that round cli/src/engine-native/signalGuard.ts, cli/src/engine.ts, cli/src/main.ts, cli/src/commands/tidy.ts, cli/src/engine-native/fileText.ts, cli/src/engine-native/ompFileDeploy.ts, cli/src/engine-native/ompKitPlugin.ts, cli/src/engine-native/ompPlugins.ts, cli/src/engine-native/ompRemovals.ts, cli/src/engine-native/tidy.ts, .agents/skills/omp-sync-context/SKILL.md, .agents/skills/sync-orchestration-context/SKILL.md, .agents/skills/sync-orchestration-context/references/dispatch-flow.md, .agents/skills/tidy-context/SKILL.md, .agents/skills/engine-native-context/SKILL.md, cli/test/unit/syncLock.test.ts, cli/test/unit/syncPipelineFailure.test.ts, cli/test/unit/engine.test.ts, cli/test/unit/contract-omp-yaml.test.ts, cli/test/unit/ompKitPlugin.test.ts, cli/test/unit/ompPaths.test.ts, cli/test/unit/ompYamlMerge.test.ts, cli/test/unit/ompRemovals.test.ts, cli/test/unit/ompPluginInventory.test.ts, cli/src/engine-native/index.ts 2 local done the unit, scan, bridges, and guidance rows pass
4 repairs_2 Repair code review round 2: the Windows path display in the dangling-link dry-run case, the EngineFailure comment, and the ompPaths comments that name FileSystem.exists or a directory check cli/test/unit/ompRemovals.test.ts, cli/src/engine-native/index.ts, cli/src/engine-native/ompPaths.ts, cli/test/unit/ompPaths.test.ts 3 local done the unit row passes, and a pre-review check shows that the case's normalized comparison matches when the expected path is built with path.win32.join and the printed path is slash-joined, and fails without the normalization; the windows row is its landing check

Acceptance

ID Command Expected
deps bun install --frozen-lockfile in the linked worktree Exit 0
unit bun x --no-install vitest run --reporter=verbose cli/test/unit/ompKitPlugin.test.ts cli/test/unit/ompPluginInventory.test.ts cli/test/unit/ompRemovals.test.ts cli/test/unit/ompYamlMerge.test.ts cli/test/unit/ompBashPatterns.test.ts cli/test/unit/contract-omp-yaml.test.ts cli/test/unit/ompFastMode.test.ts cli/test/unit/ompPaths.test.ts cli/test/unit/syncLock.test.ts cli/test/unit/rootFlags.test.ts cli/test/unit/engine.test.ts cli/test/unit/tidy.test.ts cli/test/unit/syncPipelineFailure.test.ts cli/test/unit/syncSignals.test.ts cli/test/unit/skillMetadata.test.ts Exit 0, with every base case kept with its message texts, syncPipelineFailure.test.ts ported to the Effect passes, and new cases: a signal delivered between a deploy write and its chmod, in the public and the raw channel, exits only after the chmod, with 130 on the public channel and 143 for SIGTERM on the raw channel, while the existing immediate-exit cases stay; an interrupt during a deploy write leaves the file with mode 0600; an XDG path below a regular file falls back to the config root; a BOM-prefixed deployed file is rewritten as before; and a merge whose output puts an alias before its anchor fails with a typed failure and the library message
goldens On the reviewed commit with git status --porcelain empty: bun run golden:dryrun && bun run golden:mutation && git diff --exit-code --merge-base origin/main HEAD -- cli/test/goldens Both suites OK; no golden changed
red-dry bun run golden:dryrun --prove-red Exit 1; prints prove-red OK: golden-dryrun
red-mut bun run golden:mutation --prove-red Exit 1; prints prove-red OK: golden-mutation
scan git grep -nF -e 'existsSync(' -e 'writeFileSync(' -e 'readFileSync(' -e 'mkdirSync(' -e 'chmodSync(' -e 'copyFileSync(' -e 'lstatSync(' -e 'readdirSync(' -e 'realpathSync(' -e 'unlinkSync(' -e 'rmSync(' -e 'rmdirSync(' -e 'statSync(' -e 'Effect.promise(' -e 'Effect.tryPromise(' -e 'Effect.runPromise(' -e 'Effect.runSync(' -e 'async function' -e 'Promise<' -- cli/src/engine-native/ompFileDeploy.ts cli/src/engine-native/ompKitPlugin.ts cli/src/engine-native/ompPlugins.ts cli/src/engine-native/ompRemovals.ts cli/src/engine-native/ompYaml.ts cli/src/engine-native/ompChild.ts cli/src/engine-native/ompPaths.ts cli/src/engine-native/fileText.ts Two matches, both inside Effect.try in ompKitPlugin.ts: the empty-folder removal and the typed unlinkSync of a stale plugin file; a separate git grep -nw throw over the same files finds only comment lines
bridges git grep -n -e 'bridgeSync(' -e 'bridgePromise(' -- cli/src/engine-native/ompSync.ts cli/src/engine-native/ompFileDeploy.ts cli/src/engine-native/ompKitPlugin.ts cli/src/engine-native/ompPlugins.ts cli/src/engine-native/ompRemovals.ts cli/src/engine-native/ompChild.ts cli/src/engine-native/ompPaths.ts cli/src/engine-native/tidy.ts Each match wraps a call into exec.ts, atomicWrite.ts, home.ts, processes.ts, scratch.ts, the dependency probes, a logger call (also through recordFailure or deps.warnMissing), or the bunBootstrap pass of #298; no match wraps ensureDirectory
guidance git grep -n -e 'existsSync' -e 'throws for invalid' -- .agents/skills/omp-sync-context; git grep -n -e 'Result' -- .agents/skills/omp-sync-context/references/yaml-merge.md; git grep -n -e 'ompFileDeploy.ts' -e 'ompKitPlugin.ts' -e 'ompPlugins.ts' -e 'ompRemovals.ts' -e 'ompPaths.ts' -e 'recordFailure' -- .agents/skills/sync-orchestration-context/references/dispatch-flow.md; git grep -n -e 'deferSignalExit' -- .agents/skills/sync-orchestration-context/SKILL.md The first exits 1; the second prints the Result contract of the merges; the third prints no line that lists one of these modules as bridged, and its recordFailure line names bridgeSync; the fourth prints the deferral in each of the three signal descriptions; skillMetadata.test.ts in the unit row passes
dry ./docks-kit sync --dry-run Exit 0
omp-smoke PATH="$PWD:$PATH" bun .agents/skills/verify/scripts/omp-smoke.ts on Linux, from the worktree Exit 0 with the expected output of the verify skill's V6 default mode
types bun run check:types Exit 0
ci-tools bun cli/scripts/verify-ci-tools.ts Exit 0
smoke bun run smoke:package Exit 0
gate bun run check Exit 0
windows The portable (windows-2025) unit shards of Full CI on the landing candidate Both shards pass, the dangling-link dry-run case of ompRemovals.test.ts included

Do not touch

Open questions

Verification Results

Reviewed head 06913fad (2026-12-02), linked worktree:

  • deps: exit 0. unit: exit 0, 15 files, 576 tests. goldens: both suites OK, no golden changed. red-dry and red-mut: exit 1 with prove-red OK. dry: exit 0. omp-smoke: exit 0. types: exit 0. ci-tools: exit 0. smoke: exit 0. gate: exit 0, 6538 tests passed, 12 skipped.
  • scan, bridges, and guidance on b3e8f247 (the last commit after them changes only comments and one test assertion): scan two matches, both inside Effect.try in ompKitPlugin.ts; bridges every match wraps a logger, recordFailure, replaceFile, probe, spawn, bunBootstrap, or process call; guidance first grep exits 1, the others print the expected lines.
  • Step 4 pre-review check: with the expected path built by path.win32.join and a slash-joined printed path, the normalized comparison matches and the raw comparison does not.
  • Red baselines of the new cases: each failed with its fix removed (signal and interrupt cases between a write and its chmod, Node-message detail, ENOTDIR as absent, BOM kept, alias before anchor, stale-file errno, checkpoint deadline). The dangling-link cases pass on Linux with the old probe, because access follows links there, and fail with a link-blind probe.
  • windows: portable (windows-2025) unit 1/2 and 2/2 passed in the Full CI run of the pull request on 06913fad.

Activity

  1. self-assigned this
    on Dec 1, 2026
  2. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Delegation grant: yolo: "now start #290 please, use yolo, also fix open findings in a follow up"
    Parent event: 7326116204

  3. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Delegation grant: yolo: "continue with all remaining issues via yolo please, but its an "ultra-yolo" i allow you to review rounds untill it passes and i allow you to merge without asking."

  4. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 1

    Plan-review: repair

    • goal_fit - Research, Write groups and Failure model; Do not touch, deployed modes - Inference: a handled SIGTERM can now exit after a write or copy finishes but before its chmod runs. The pairs in cli/src/engine-native/ompFileDeploy.ts:29-42 currently run synchronously, while the proposed calls yield to the event loop. Effect.uninterruptible defers fiber interruption, not the process.exit calls in cli/src/engine.ts:62-85 and cli/src/main.ts:45-46. A rewritten file can retain its old permissive mode, and the equality check at ompFileDeploy.ts:62-64 can skip it on retry - Defer handled signals until each permission-setting group settles, or make the mutation enforce the private mode without a second asynchronous step. Keep each entry point’s signal exit code. - class: process exit bypasses an asynchronous write group
    • goal_fit - Research, Files, Write groups, and Failure model - The protected groups cover writes, copies, and mkdir paired with chmod, but not the stale-file unlink in cli/src/engine-native/ompKitPlugin.ts:39 or the upgrade-log removal in cli/src/engine-native/ompPlugins.ts:229. The pinned Effect Node provider wraps callback-based fs.rm without cancellation. Inference: interrupting during either removal can release the scope in cli/src/engine-native/syncDispatch.ts:266-287 while deletion is still in progress. The previous synchronous removals finished under the locks - Keep each started deletion under the locks until it settles. Allow interruption between mutations. - class: uncancelled filesystem mutation outlives its lock
    • goal_fit - Steps passes, Files; Acceptance unit - The cutover is missing callers. cli/src/engine-native/index.ts:28-42 and cli/src/engine.ts:29-38 cannot carry and render the new YAML or filesystem failures as written. cli/src/commands/tidy.ts:59-77,105-146 still constrains the failure channel of applyTidy to the old types. cli/test/unit/syncPipelineFailure.test.ts:16,82-99,105-129 still returns Promises to the new Effect caller and expects the removed pass bridge’s failure. .agents/skills/verify/scripts/omp-smoke.ts:575-595 still reads fields from synchronous ompPaths; inference: the smoke fails before it installs the isolated plugin, and cli/tsconfig.json does not cover that script - Name the required caller files in passes, route the new typed failures through the CLI boundaries without changing their messages, port the pipeline regression, and run the migrated smoke entry end to end. - class: path missing from a Files cell
    • goal_fit - Research, Files and Bridges; Acceptance bridges; parent Move the engine-native layer to Effect #290, File owners and D1 - cli/src/engine-native/ompPlugins.ts:311,319 calls both deps.probe("omp") and deps.probe("git"). These synchronous probes reach the dependency executor through cli/src/engine-native/services.ts:67 and cli/src/engine-native/deps.ts:107-113,173-179. Move the toolchain passes to Effect #298 owns them, but the child’s accepted bridge list excludes them. Once the enclosing syncPlugins bridge goes, a probe exception no longer reaches the error channel as D1 requires. The same Acceptance row omits cli/src/engine-native/tidy.ts:1361, where leaving the old ensureDirectory bridge would return an Effect without running it - Bridge both probes until Move the toolchain passes to Effect #298 and update the row to accept them and reject the obsolete tidy bridge. - class: bridge inventory does not match the migration boundary
    • research_gap - Research, Effect facts, Files, and Paths - The pinned FileSystem.exists implementation returns false only for NotFound; the provider maps ENOTDIR to BadResource. With an XDG path whose ancestor is a regular file, cli/src/engine-native/ompPaths.ts:117-122 currently falls back to the config root, while a direct substitution fails the run. The same distinction affects the other converted existsSync sites. Registry reads have a separate contract: cli/src/engine-native/ompPlugins.ts:175-185 treats ENOENT and ENOTDIR as missing but warns on denied reads - Specify the legacy outcome at each existence probe and keep the registry read’s narrower errno distinction. - class: replacement filesystem predicate has different failure semantics
    • research_gap - Research, Effect facts and Files - The pinned readFileString implementation uses TextDecoder, which strips a UTF-8 BOM by default. Inference: a direct substitution can make a BOM-prefixed AGENTS.md compare equal at cli/src/engine-native/ompFileDeploy.ts:62, skipping the current backup and rewrite. It can also make a BOM-prefixed marketplace registry parse at cli/src/engine-native/ompPlugins.ts:177-185, where the old path warns and suppresses removal - Preserve the existing UTF-8 decoding for the migrated text reads, including comparisons and registry parsing. - class: replacement text reader changes decoded input
    • research_gap - Research, Repository facts and YAML - Converting the four explicit throws misses serialization failures. cli/src/engine-native/ompYaml.ts:129-194 can move a deployed alias under a managed key ahead of its deployed-only anchor; yaml 2.9.1 then throws during stringification. For example, an alias under retry can be emitted before its top-level anchor because SoT/.omp/config.yml:65 already owns retry. cli/src/engine-native/ompRemovals.ts:407-409 can also throw when it serializes a document after pruning an anchor. Inference: once the outer bridges are removed, these failures escape as defects rather than typed errors - Cover the merge and prune serialization failures in the typed channel and preserve their existing messages. - class: library throw omitted from typed failure migration
    • goal_fit - Acceptance scan - cli/src/plan/records.ts:216-245,405-410 splits the unescaped regex alternation pipes into table cells, so the recorded Command is truncated. Even if copied from the raw text, the padded alternatives do not match calls such as existsSync(candidate) in cli/src/engine-native/ompPaths.ts:122 or writeFileSync(target, …) in cli/src/engine-native/ompFileDeploy.ts:35; rmSync in cli/src/engine-native/ompPlugins.ts:229 and the candidate rmdirSync exception in cli/src/engine-native/ompKitPlugin.ts:35 are also absent - Use separate git grep -e patterns or a table-safe equivalent that detects the actual calls and distinguishes the one approved fallback from forbidden matches. - class: acceptance scan cannot detect the obsolete code it claims to reject
    • goal_fit - Steps guidance, Files; Acceptance guidance; parent Move the engine-native layer to Effect #290 D1 - .agents/skills/sync-orchestration-context/references/dispatch-flow.md:95-102 would still tell agents to bridge all calls into the migrated passes. .agents/skills/omp-sync-context/references/yaml-merge.md:51-55 would still direct agents to a throwing YAML contract after the function returns Result. The existsSync scan can pass while both obsolete instructions remain - Update both references in this child and make guidance check the replacement rules, not just the absence of existsSync in one file. - class: guidance still instructs callers to use the old contract
    • research_gap - Research, Tool facts; Acceptance unit, dry, smoke, and gate - The stated Bun, Git, and golden-stub environment is insufficient. node_modules/vitest/vitest.mjs:1 requires Node, docks-kit:1 requires Bash, cli/scripts/package-smoke.ts:260-262 invokes tar, and AGENTS.md:77 requires GPG, GNU tar, util-linux script, and full history with origin/main for the Linux gate. With only the stated tools, the acceptance commands can fail before exercising the migration - Record the actual host prerequisites and their version sources. Keep the required gate. - class: acceptance environment omits required host tools
  5. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 2, delta

    Plan-review: repair

    • goal_fit - Research, Mutation regions; Steps passes, Files; Do not touch, deployed modes - The raw entry still exits directly from its signal handlers (cli/src/main.ts:42-50). The existing guard only defers exits for listeners that consult it, and its deferred exit is hard-coded to 130 (cli/src/engine.ts:62-110). Inference: a raw SIGTERM after a deploy write but before chmod can leave the new bytes at the old mode, and the equality check can skip chmod on retry (cli/src/engine-native/ompFileDeploy.ts:34-36,62-64). Installing the public guard unchanged would instead regress raw SIGTERM from 143 to 130 - Add cli/src/main.ts to passes and route both entry points through mutation deferral while preserving their distinct exit codes and immediate exits outside protected regions - class: process exit bypasses an asynchronous write group
    • research_gap - Research, Effect facts and Files - The proposed shared readTextKeepingBom does not just decode bytes. It folds every filesystem failure into None (cli/src/engine-native/tidy.ts:129-141). Moving it unchanged makes a denied read indistinguishable from ENOENT or ENOTDIR. The plugin pass must warn and suppress marketplace removal on a denied active registry read, but may consult the legacy registry when the active file is missing (cli/src/engine-native/ompPlugins.ts:175-209). Whole-file comparisons, YAML reads, and the deployed manifest read also currently propagate read failures rather than treating them as absence - Share a BOM-preserving reader that retains the typed filesystem error. Keep optional recovery at the tidy call sites and the existing errno distinction at the registry call sites - class: replacement filesystem read discards a required error distinction
    • goal_fit - Research, Files and Bridges; Acceptance bridges; parent Move the engine-native layer to Effect #290, File owners and D1 - The parent says synchronous logger throws remain bridged until Move the process layer, the file helpers, and the kit store to Effect #297. Today runPluginCommand calls recordFailure inside the enclosing syncPlugins bridge (cli/src/engine-native/ompPlugins.ts:138-153, cli/src/engine-native/ompSync.ts:112). recordFailure also warns (cli/src/engine-native/failures.ts:13-16), and the logger rethrows synchronous sink errors other than EPIPE (cli/src/engine-native/logger.ts:93-106). With the prescribed Effect.sync, a throwing warning sink becomes a defect instead of a typed failure. Direct logger calls and deps.warnMissing in the migrated passes lose the same protection - Retain a typed boundary for synchronous logger calls that lose their pass bridge, including indirect calls through recordFailure and warnMissing, and recognize that boundary in bridges until Move the process layer, the file helpers, and the kit store to Effect #297 - class: migrated caller drops the typed boundary around a legacy throw
    • goal_fit - Steps passes, Done when; Acceptance unit - The row promises that syncPipelineFailure.test.ts is ported, but omits that file from the command. Vitest's positional arguments filter test files, so the focused row can pass while the pipeline test still returns a Promise and expects the removed LegacyStepFailed pass wrapper (cli/test/unit/syncPipelineFailure.test.ts:78-99) - Add the existing pipeline test file to the unit command - class: acceptance command does not run the test it claims to verify
    • goal_fit - Acceptance scan; Research, Files - The fixed-string scan now catches the old calls in the seven pass modules, but omits the new fileText.ts. Inference: moving an existing readFileSync(..., "utf8") read from ompFileDeploy.ts:62,99 into that helper would preserve the BOM regression result while bypassing FileSystem, and the scan would still report only the allowed removal - Include fileText.ts in the scan - class: acceptance scan cannot detect the obsolete code it claims to reject
    • goal_fit - Steps guidance; Acceptance guidance; Research, Mutation regions - The bridge check can pass if only ompFileDeploy.ts and ompPaths.ts are removed from the list while ompKitPlugin.ts, ompPlugins.ts, and ompRemovals.ts still appear as bridged (.agents/skills/sync-orchestration-context/references/dispatch-flow.md:95-102). The YAML check can also pass by deleting the old test reference without recording the Result contract (.agents/skills/omp-sync-context/references/yaml-merge.md:51-55). The step does not replace the three unconditional immediate-exit instructions in .agents/skills/sync-orchestration-context/SKILL.md:141,227-232,266-271, which contradict Mutation regions - Update all three signal descriptions and make the existing row check the replacement bridge, YAML, and signal rules - class: guidance cutover can pass with the old contract still in force
    • research_gap - Research, Tool facts; Acceptance omp-smoke, unit, and gate - The new smoke row requires docks-kit on PATH for scratch creation and cleanup (.agents/skills/verify/SKILL.md:16-21, .agents/skills/verify/scripts/omp-smoke.ts:279-284,322-327); having ./docks-kit and the pinned omp is not enough. The focused tidy suite requires mv and du (cli/test/unit/tidy.test.ts:1167,1262,1492), and the Linux gate requires sh and ps (.agents/skills/review-benchmark/tests/escapes-outcomes.test.mjs:1122-1123, .agents/skills/review-benchmark/tests/keys.test.mjs:401-402). In the stated environment without those commands, the checks can fail before exercising the migration - Bind the smoke to the checkout launcher or document the required docks-kit on PATH, and record the remaining required host tools and version sources - class: acceptance environment omits required host tools

    Previous findings:

    • Round-1 finding on Research, Write groups and Failure model; Do not touch, deployed modes: open - repeated above
    • Round-1 finding on Research, Files, Write groups, and Failure model: resolved - Mutation regions now keep each started removal uninterruptible until it settles, before the lock scope can close. Raw process signals are covered by the preceding open finding.
    • Round-1 finding on Steps passes, Files; Acceptance unit: open - repeated above. The caller files and end-to-end smoke are now in scope; the focused command still omits the pipeline test.
    • Round-1 finding on Research, Files and Bridges; Acceptance bridges; parent Move the engine-native layer to Effect #290, File owners and D1: resolved - Files now bridges both dependency probes, and bridges includes tidy.ts and rejects the obsolete ensureDirectory bridge.
    • Round-1 finding on Research, Effect facts, Files, and Paths: open - repeated above. The existence probes now retain the old fallback, but the shared reader loses the registry errno distinction.
    • Round-1 finding on Research, Effect facts and Files: resolved - Files now requires the BOM-preserving decoder for comparison and parser reads, and unit checks the deployed-file rewrite.
    • Round-1 finding on Research, Repository facts and YAML: resolved - YAML explicitly moves both merge and prune serialization failures into the typed channel with their library messages.
    • Round-1 finding on Acceptance scan: open - repeated above. The patterns are now table-safe and catch the original calls, but miss the shared reader added by this repair.
    • Round-1 finding on Steps guidance, Files; Acceptance guidance; parent Move the engine-native layer to Effect #290 D1: open - repeated above
    • Round-1 finding on Research, Tool facts; Acceptance unit, dry, smoke, and gate: open - repeated above. The previously named tools are recorded; the stated environment still omits commands required by the reviewed rows.

    Manager response to round 1

    Repaired:

    • Signals and removals: new decision "Mutation regions": each started mutation (write or copy with its chmod, directory creation with its chmod, each removal, each replaceFile) runs uninterruptibly inside deferSignalExit; interruption and the signal exit stay possible between mutations.
    • Callers: index.ts, engine.ts, commands/tidy.ts, tidyReport.ts, syncPipelineFailure.test.ts, and omp-smoke.ts are in step 1; a new omp-smoke row runs the smoke end to end.
    • Bridges: the dependency probes of ompPlugins.ts are bridged until Move the toolchain passes to Effect #298; the bridges row accepts them and rejects a bridge around ensureDirectory in tidy.ts.
    • Existence probes keep the existsSync outcome; the registry read keeps its ENOENT/ENOTDIR rule; a new case covers an XDG path below a regular file.
    • BOM: text reads keep a leading BOM through readTextKeepingBom, moved to a shared fileText.ts; a new case covers a BOM-prefixed deployed file.
    • YAML: serialization throws of the merge and the prune become typed failures with the library message; a new case.
    • Scan row: table-safe fixed-string patterns that match the real calls and the one approved fallback.
    • Guidance: yaml-merge.md and dispatch-flow.md join step 2; the guidance row checks the replacement rules.
    • Tool facts: host prerequisites with versions and sources, and the omp pin for the smoke.

    Rejected: none.

    Redesigned: none.

  6. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 3, delta

    Plan-review: repair

    • goal_fit - Acceptance unit; Research, Mutation regions; Steps passes, Files - The existing signal tests send signals while an omp child waits or while the CLI polls a held lock, never during a deploy write (cli/test/unit/syncSignals.test.ts:599-646). Inference: Effect.uninterruptible alone can pass the planned fiber-interrupt case while a raw SIGTERM still exits after the write and before chmod, leaving the old mode on the new bytes (cli/src/main.ts:42-47, cli/src/engine-native/ompFileDeploy.ts:34-36,62-66) - Extend the existing unit row and passes Files to cover a signal delivered between write and chmod in both channels. Assert that chmod finishes before exit and that SIGTERM returns 130 on the public channel and 143 on the raw channel. Keep the existing immediate-exit cases as regression guards - class: acceptance exercises fiber interruption but not process-signal deferral
    • goal_fit - Steps guidance; Acceptance guidance; Research, Files - The revised check can pass while dispatch-flow.md:101-103 still tells Effect callers to use Effect.sync for recordFailure. That function appends to the ledger and calls the warning sink (cli/src/engine-native/failures.ts:13-16). Following the old rule in the migrated plugin pass would turn a sink throw into a defect instead of the typed failure the plan requires - Update the ledger paragraph to state the migrated plugin pass's bridgeSync rule, and make the existing guidance row check that rule - class: guidance cutover can pass with the old contract still in force
    • research_gap - Research, Tool facts; Acceptance gate - The smoke launcher and the tools named in round 2 are now covered, but the Linux gate also runs mkfifo (.agents/skills/review-benchmark/tests/prepare-bundled.test.mjs:879-885), gpgconf, gpg-connect-agent, and tty (.agents/skills/review-benchmark/tests/keys.test.mjs:33-34,487-492,531-537), real installer helpers cat, chmod, cp, ln, mkdir, mktemp, and rm (cli/test/unit/install.test.ts:127-142), and scan helpers env, tr, awk, and sort, plus locale discovery and the UTF-8 case's grep and sed (cli/test/unit/plugin/codeGuardrailsScan.test.ts:19-24,185-191,552-565). For example, the FIFO case fails at fixture setup without mkfifo, before it reaches the behavior under test - Record the missing gate tools and their version sources, grouping commands that resolve to the same package and noting conditional cases - class: acceptance environment omits required host tools

    Previous findings:

    • Round-2 finding on Research, Mutation regions; Steps passes, Files; Do not touch, deployed modes: resolved - main.ts joins passes, and Mutation regions now requires the raw entry to use deferral with its own exit codes. The new acceptance finding above concerns verification of that repair.
    • Round-2 finding on Research, Effect facts and Files: resolved - The shared BOM-preserving reader retains PlatformError. Tidy recovers at its call sites, the registry retains its errno rule, and the other reads propagate failures.
    • Round-2 finding on Research, Files and Bridges; Acceptance bridges; parent Move the engine-native layer to Effect #290, File owners and D1: resolved - Files requires bridgeSync for direct and indirect logger calls in the migrated passes, and bridges allows those calls.
    • Round-2 finding on Steps passes, Done when; Acceptance unit: resolved - The focused Vitest command now includes syncPipelineFailure.test.ts.
    • Round-2 finding on Acceptance scan; Research, Files: resolved - The fixed-string scan now covers fileText.ts.
    • Round-2 finding on Steps guidance; Acceptance guidance; Research, Mutation regions: open - repeated above. The three signal descriptions, YAML Result contract, and five module names are covered. The ledger rule is still unchecked.
    • Round-2 finding on Research, Tool facts; Acceptance omp-smoke, unit, and gate: open - repeated above. The smoke uses the checkout launcher and the focused tools are recorded, but the full gate still has unlisted host dependencies.

    Manager response to round 2

    Repaired:

    • Raw channel: cli/src/main.ts joins step 1; exitOnSignal and deferSignalExit take the exit code per signal, so the raw channel keeps 130 and 143 and the public channel keeps 130.
    • Shared reader: fileText.ts keeps the typed read failure; tidy keeps its optional recovery, the registry keeps its errno rule, and the other reads keep propagating failures.
    • Logger: logger calls of the moved passes, also through recordFailure and deps.warnMissing, stay bridged until Move the process layer, the file helpers, and the kit store to Effect #297; the bridges row accepts them.
    • unit row: adds syncPipelineFailure.test.ts and syncSignals.test.ts.
    • scan row: covers fileText.ts.
    • Guidance: the three signal descriptions of sync-orchestration-context join step 2; the guidance row checks the Result contract, all five modules in the bridge list, and the deferral text.
    • Tool facts (redesigned after the finding returned): every host tool that a row runs, resolved and read from its Ubuntu package with dpkg-query -W, and docks-kit on PATH for the smoke row.

    Rejected: none.

    Redesigned: none.

  7. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 4, delta

    Plan-review: pass

    None.

    Previous findings:

    • Round-3 finding on Acceptance unit; Research, Mutation regions; Steps passes, Files: resolved - passes includes the signal test and preload. unit requires SIGTERM between the deploy write and chmod in both channels, then exit after chmod with code 130 public and 143 raw. The existing immediate-exit cases remain.
    • Round-3 finding on Steps guidance; Acceptance guidance; Research, Files: resolved - The step replaces the plugin pass's Effect.sync guidance with bridgeSync for recordFailure, and the revised acceptance row checks that rule.
    • Round-3 finding on Research, Tool facts; Acceptance gate: rejected - not repeated. The plan adds no host-tool dependency to the standard gate, and parity.yml runs its component checks on the repository's Linux runner.

    Manager response to round 3

    Repaired:

    • Signal during a deploy write: new cases in both channels (130 public, 143 raw SIGTERM) that exit only after the chmod; syncSignals.test.ts and signalSelfPreload.ts join step 1.
    • Guidance: the ledger paragraph of dispatch-flow.md names bridgeSync for recordFailure of the plugin pass; the guidance row checks it.

    Rejected:

    Redesigned: none.

  8. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Code review round 1, lens correctness

    Code-review: pass

    Standards

    • [MEDIUM] Bug - cli/src/engine-native/fileText.ts:30-33, cli/src/engine-native/ompFileDeploy.ts:72-77,99-110, cli/src/engine-native/ompKitPlugin.ts:81-83,115-119, cli/src/engine-native/ompRemovals.ts:392-394, cli/src/engine-native/ompPlugins.ts:243-246 - On Windows, a deployed symlink whose target has not been created is reported present, so sync tries to read it and aborts. Even a dry run fails on a dangling config.yml instead of previewing installation. In Bun 1.4.5, existsSync follows the link, but the access(F_OK) behind FileSystem.exists checks the link's own attributes. The same false positive can send a dangling upgrade-log link into removal instead of leaving it alone. - Use a target-following existence probe for these Windows paths and keep treating probe failures as absent. - class: non-equivalent existence probe
    • [MEDIUM] Bug - cli/src/engine-native/ompFileDeploy.ts:72-78 - If an editor or setup tool creates mcp.json after the comparison probe but before deployment, sync can truncate the new file without saving a .bak. The folder lock only coordinates kit writers. The old code checked again before deciding whether to back up; the new code reuses the first result across asynchronous I/O. - Restore the backup-time check. If a target appears after the final absence check, refuse to overwrite it without a backup. - class: stale existence check before overwrite
    • [LOW] Bug - cli/src/engine-native/ompKitPlugin.ts:72-74 - When the kernel refuses to unlink a stale plugin file with EPERM, as it does for an immutable file on Linux, Bun 1.4.5's non-recursive rm maps that error to EFAULT. Sync still fails, but now reports a bad address instead of the permission error that identifies the problem. - Use a typed unlink operation for stale non-directories inside the existing mutation region. - class: lossy filesystem operation substitution
    • [LOW] Bug - cli/src/engine-native/ompPlugins.ts:245-254,332 - Unreached: if the retired upgrade log is removed and only its verbose status write throws, the plugin pass now aborts before probing omp. The old recovery covered the write and continued if the warning succeeded. I checked the live verbose path, the upgrade-log fixture, and the injected logger-failure fixtures; none produces this specific sink failure. - Keep the removal and success log under the same typed recovery, with the warning outside it. - class: narrowed error recovery

    Spec

    None.

    Code review round 1, lens spec-and-tests

    Code-review: pass

    Standards

    • [MEDIUM] Bug - cli/test/unit/syncLock.test.ts:648-689 - If sync fails or exits before the intercepted AGENTS.md write, entered.promise never settles. Vitest times out, but neither the test’s finally nor withHome restores HOME and the other environment variables, so later cases in the same worker can inherit the failed case’s state. - Race the write checkpoint against fiber completion and a bounded deadline, and let either failure unwind through the existing cleanup. - class: test checkpoint without a failure path
    • [LOW] Bug - cli/test/unit/syncPipelineFailure.test.ts:75-88, cli/test/unit/syncPipelineFailure.test.ts:104-108 - The assertion for the omp plugin list --json step passes even if production stops bridging that child. The mock replaces syncPlugins, constructs the asserted step itself, and injects a child failure into a dry run that starts no omp child. The ledger and cleanup assertions still exercise the pipeline. - Keep those assertions, but exercise the production bridge by injecting the rejection at spawnProcess in a writing sync. - class: test asserts a failure constructed by its own mock
    • [LOW] Bug - cli/test/unit/engine.test.ts:146-155 - If another process leaves a readable file at the fixed path under the system temp directory, the read succeeds and the test fails for an unrelated reason. The test neither creates nor owns that path. - Create a unique temporary directory, read an absent child within it, and remove the directory on cleanup. - class: unowned temporary fixture path

    Spec

    • [MEDIUM] Spec - cli/src/engine-native/ompFileDeploy.ts:72-78 - If an editor creates mcp.json after the first existence probe but before the point where the base code probed again, sync overwrites it without a backup. Conversely, if the editor removes a file after the comparison read but before that point, sync now attempts a backup and can abort instead of deploying the file. The inference assumes a writer outside the kit locks. Reusing the first result changes the outcome despite plan-296-cr1.md:28 requiring “the same outcome”; cli/src/engine-native/DESIGN.md:51-52 also specifies backups before replacement. - Restore the existence probe at the backup decision, separate from the probe used for comparison. - class: stale existence result reused for backup
    • [LOW] Spec - cli/src/engine-native/ompPlugins.ts:245-254, cli/src/engine-native/ompPlugins.ts:334 - Unreached: If removal succeeds but its success log throws once, the base catch warns and continues, while the new success branch fails the sync before the inventory probe. The live logger and the upgrade-log fixtures were checked; none establishes that one-shot sink failure. The change conflicts with plan-296-cr1.md:33, “a failure of one pass keeps the base ledger and exit code.” - Keep the bridged success log inside the same recovery boundary as removal, with the warning outside it. - class: narrowed recovery boundary
    • [LOW] Spec - cli/test/unit/contract-omp-yaml.test.ts:33-37 - The fixture deletes the anchor rather than moving its alias ahead of it. Both cases produce the same library diagnostic, so the fixture does not exercise the case required by plan-296-cr1.md:48, “a merge whose output puts an alias before its anchor.” - Use a deployed document with an anchored top-level key followed by an alias inside a managed mapping. Keep the mapping first in the SoT so the merge retains both nodes but emits the alias first. - class: acceptance fixture exercises the wrong input condition

    Code review round 1, lens text-and-safety

    Code-review: pass

    Standards

    • [MEDIUM] Bug - cli/src/engine-native/fileText.ts:25-32, cli/src/engine-native/ompFileDeploy.ts:99-110, .agents/skills/omp-sync-context/SKILL.md:79-80 - On Windows, sync takes the read branch for a symlinked config.yml whose target is missing, then fails instead of taking the install branch. The new helper claims to match existsSync, but Bun 1.4.5 implements access with GetFileAttributesW, which sees the link itself. Its existsSync follows the link before returning true. The failure is an inference from those implementations and the sync call path. The documented symlink setup reaches this path; the existing fixture only covers a live target. - Preserve the target-following probe on Windows and add a regression case for a missing link target. - class: non-equivalent existence probe
    • [MEDIUM] Maintainability - cli/src/engine-native/ompFileDeploy.ts:13, cli/src/engine-native/ompKitPlugin.ts:13, cli/src/engine-native/ompPlugins.ts:19, cli/src/engine-native/ompRemovals.ts:16, cli/src/engine.ts:3 - The four passes import the public CLI seam for mutationRegion, but the seam imports those passes through index.ts, syncDispatch.ts, and ompSync.ts. Direct consumers such as the tidy command now load the sync dispatcher to get a file mutation helper. The cycle works today because the passes read the helper lazily, so moving a read to module initialization can make imports fail. This blurs the boundary in base cli/AGENTS.md:40: “The public CLI seam is cli/src/engine.ts.” - Put the signal state and mutation helpers in a dependency-neutral module that both the seam and the passes import. - class: circular dependency across the CLI seam
    • [LOW] Bug - .agents/skills/omp-sync-context/SKILL.md:70-72, .agents/skills/sync-orchestration-context/SKILL.md:228-231, cli/src/engine-native/index.ts:31-33 - The new guidance says a failed file operation fails the run with PlatformError. In a writing sync, an upgrade-log removal failure only warns at ompPlugins.ts:240-255, and an empty plugin-folder removal failure propagates as PluginFolderRemoveFailed at ompKitPlugin.ts:62-68. A maintainer following the guidance would look for the wrong failure or expect an exit that does not happen. - Describe which FileSystem errors propagate and name the warning and empty-folder exceptions. - class: overstated error propagation
    • [LOW] Bug - .agents/skills/sync-orchestration-context/references/dispatch-flow.md:102-104, cli/src/engine-native/ompYaml.ts:236-255 - The dispatch reference lists ompYaml.ts among the Effect passes. Its merge functions are plain and return Result; syncMergedYaml converts the result into an Effect. A reader following this reference could yield the merge directly rather than use Effect.fromResult. - List the YAML merges separately as plain Result functions. - class: wrong return contract in guidance
    • [LOW] Bug - cli/src/engine-native/ompPaths.ts:56, cli/src/engine-native/ompPaths.ts:95-101, .agents/skills/omp-sync-context/SKILL.md:93-100 - Unreached: The sync and root callers read the environment, the documented setup creates directories, and the regular-file fixture in ompPaths.test.ts:119-125 covers a parent component, not the final candidate. If $XDG_DATA_HOME/omp itself is a regular file on Linux or macOS, the probe still adopts it. The guidance implies that it verifies a directory, but it only checks existence. - Say that the final candidate is probed for existence, and distinguish it from a non-directory ancestor. - class: existence mistaken for type validation
    • [LOW] Bug - cli/test/unit/syncPipelineFailure.test.ts:6-7, cli/test/unit/syncPipelineFailure.test.ts:22-25, cli/test/unit/syncPipelineFailure.test.ts:73-81, cli/test/unit/syncPipelineFailure.test.ts:104-108 - The test says a bridged omp child rejects, but the dry-run test replaces syncPlugins and manufactures the bridge failure. Its step assertion would still pass if the production spawnOmp bridge changed or stopped producing that step. The ledger and cleanup assertions still exercise the pipeline. - Describe the test as injecting a typed pass failure and drop the mock-controlled step assertion, or test the step through the real pass with only the spawn stubbed. - class: mocked implementation asserted as production behavior
    • [LOW] Maintainability - cli/test/unit/engine.test.ts:146-155 - The new error test assumes a fixed path under the shared temp directory does not exist. A file left there by another run or process makes readFile succeed and fails the test for an unrelated reason. - Use a missing child of a test-owned temporary directory and clean up the directory. - class: unisolated temporary fixture

    Spec

    None.

  9. 1 remaining item

  10. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 6, delta

    Plan-review: pass

    None.

    Previous findings:

    • Round-5 finding on Research, Signal guard and Mutation regions; Steps repairs: resolved - Both decisions name signalGuard.ts, and applyTidy shares that guard with the CLI entry points.
    • Round-5 finding on Steps repairs, Files; Acceptance unit: resolved - repairs now includes .agents/skills/engine-native-context/SKILL.md, and unit runs the source-range check.
    • Round-5 finding on Steps repairs, typed unlink; Research, Files; Acceptance scan: resolved - The step and Research specify typed unlinkSync inside Effect.try, and scan now expects both native exceptions.
    • Round-5 finding on Steps repairs, backup-time existence probe: rejected - not repeated. At ab33f4fe, ompFileDeploy.ts:62–67 checks existence again before backup, then writes unconditionally. The repair restores that baseline; exclusive creation would reject a dangling symlink that the baseline writes through.

    Manager response to round 5

    Repaired:

    • Signal guard: Mutation regions names signalGuard.ts; cli/src/engine-native/tidy.ts (applyTidy) joins the importers and uses the same guard; cli/src/engine.ts keeps no copy.
    • Files: .agents/skills/engine-native-context/SKILL.md joins step repairs for its source range.
    • Native exceptions: the Files decision and the scan row record the typed file removal of a stale plugin file as the second Effect.try exception.

    Rejected:

    • Non-clobbering create on the absent branch of the whole-file deploy: the base code probed with existsSync at the backup decision and then wrote with writeFileSync, with the same window for an outside writer (cli/src/engine-native/ompFileDeploy.ts at ab33f4f). The plan requires the base outcome, which the restored backup-time probe gives. An exclusive create would fail on a dangling symlink that the base wrote through, which changes the documented symlink setup.

    Redesigned: none.

  11. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 7, delta

    Plan-review: pass

    None.

    Previous findings:

    None open.

    Manager response to round 6

    Plan edit after the round-6 pass:

    • Step 3 repairs Files: adds cli/test/unit/ompRemovals.test.ts and cli/test/unit/ompPluginInventory.test.ts (the dangling-symlink regression cases for config.yml and the upgrade log), and cli/src/engine-native/index.ts (a new typed error for the stale plugin file removal joins the EngineFailure union).
  12. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 8, delta

    Plan-review: repair

    • goal_fit - Steps repairs_2, Done when (line 44) - The step can be marked done without fixing the Windows assertion. The pre-repair test compared a native join path with the slash-joined preview target (cli/test/unit/ompRemovals.test.ts:420-434, cli/src/engine-native/ompSync.ts:89, cli/src/engine-native/exec.ts:63-66). The local unit check passes on Linux without the fix because the separators already match there. - Require the dangling-link dry-run case to pass in the existing Windows unit shard (.github/workflows/parity.yml:99-126) before marking the step done. Keep the local unit row as a regression guard. - class: completion check cannot distinguish a platform-specific repair

    Previous findings:

    None open.

    Manager response to round 7

    Plan edits after the round-7 pass:

    • Paths decision: names the shared target-following probe pathExists (a FileSystem.stat whose failure counts as absent) instead of FileSystem.exists, as step 3 implemented after code review round 1.
    • New planned step 4 repairs-2: the Windows path display of the dangling-link dry-run case, the EngineFailure comment, and the ompPaths comments.
  13. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Code review round 2, delta

    Code-review: pass

    Previous findings

    • Round-1 finding on cli/src/engine-native/fileText.ts:30-33, non-equivalent existence probe: fixed - pathExists follows the target with stat and maps probe failures to absence at cli/src/engine-native/fileText.ts:33-38.
    • Round-1 finding on cli/src/engine-native/ompFileDeploy.ts:72-78, stale existence check: fixed - The comparison result no longer controls the backup; the separate probe at cli/src/engine-native/ompFileDeploy.ts:77 restores the base behavior.
    • Round-1 finding on cli/src/engine-native/ompKitPlugin.ts:72-74: fixed - The prune uses typed unlinkSync at cli/src/engine-native/ompKitPlugin.ts:91-97, and cli/src/engine.ts:38-39 prints the captured error message.
    • Round-1 finding on cli/src/engine-native/ompPlugins.ts:245-254, error recovery: fixed - The removal and its status write now share typed recovery at cli/src/engine-native/ompPlugins.ts:246-259.
    • Round-1 finding on cli/test/unit/syncLock.test.ts:648-689: fixed - The checkpoint races fiber completion and a deadline at cli/test/unit/syncLock.test.ts:590-611, so an early exit reaches the fixture cleanup.
    • Round-1 finding on cli/test/unit/syncPipelineFailure.test.ts:75-88,104-108: fixed - The test no longer asserts a child command manufactured by its mock; cli/test/unit/syncPipelineFailure.test.ts:100-108 checks the pipeline's ledger, summary, failure channel, and error text.
    • Round-1 finding on cli/test/unit/engine.test.ts:146-155, unowned fixture path: fixed - cli/test/unit/engine.test.ts:146-160 reads a missing child of a directory the test owns and removes afterward.
    • Round-1 finding on cli/src/engine-native/ompFileDeploy.ts:72-78, backup parity: fixed - cli/src/engine-native/ompFileDeploy.ts:77 checks again before deciding whether to back up, so a file created or removed between the two probes is handled as in the base.
    • Round-1 finding on cli/src/engine-native/ompPlugins.ts:245-254,334, recovery parity: fixed - cli/src/engine-native/ompPlugins.ts:246-259 warns and continues when the status write fails and the warning succeeds.
    • Round-1 finding on cli/test/unit/contract-omp-yaml.test.ts:33-37: fixed - cli/test/unit/contract-omp-yaml.test.ts:33-40 retains both nodes and puts the managed mapping containing the alias before the deployed-only anchor.
    • Round-1 finding on cli/src/engine-native/fileText.ts:25-32, Windows dangling link: fixed - cli/src/engine-native/fileText.ts:33-38 checks the link target and .agents/skills/omp-sync-context/SKILL.md:96-100 describes that behavior.
    • Round-1 finding on cli/src/engine-native/ompFileDeploy.ts:13 and the other pass imports: fixed - cli/src/engine-native/signalGuard.ts:1-8 imports no pass or CLI module; the passes, tidy, and both CLI channels use the same guard.
    • Round-1 finding on cli/src/engine-native/index.ts:31-33, overstated error propagation: open - repeated under Standards.
    • Round-1 finding on .agents/skills/sync-orchestration-context/references/dispatch-flow.md:102-104: fixed - .agents/skills/sync-orchestration-context/references/dispatch-flow.md:104-108 distinguishes the plain Result merges from the Effect passes.
    • Round-1 finding on cli/src/engine-native/ompPaths.ts:56,95-101 and .agents/skills/omp-sync-context/SKILL.md:93-100: open - repeated under Standards.
    • Round-1 finding on cli/test/unit/syncPipelineFailure.test.ts:6-7,22-25,73-81,104-108: fixed - cli/test/unit/syncPipelineFailure.test.ts:6-8,73-82,100-108 describes an injected pass failure and no longer claims to test the production child bridge.
    • Round-1 finding on cli/test/unit/engine.test.ts:146-155, unisolated fixture: fixed - cli/test/unit/engine.test.ts:146-160 owns and cleans up the temporary directory.

    Standards

    • [MEDIUM] Bug - cli/test/unit/ompRemovals.test.ts:418-432, cli/src/engine-native/ompSync.ts:89, cli/src/engine-native/ompFileDeploy.ts:99-102 - On the Windows unit shard, assuming the symlink fixture is created, the dry-run assertion fails even when sync takes the correct install branch. The test interpolates a path built with Windows path.join; the engine prints the target built with slash-joining p (cli/src/engine-native/exec.ts:63-66). The string mismatch is an inference from those call paths. - Normalize separators on both sides as rootFlags.test.ts:80-85 does, or build the expected display path with p. - class: host-native path asserted against engine display path
    • [LOW] Bug - cli/src/engine-native/index.ts:30-35, cli/src/engine-native/ompPlugins.ts:245-259 - The EngineFailure comment still says a file operation in an omp pass fails the run with PlatformError. In a writing sync, a failed retired upgrade-log removal instead warns and continues if the warning succeeds. The repaired skill guidance now distinguishes those cases, but the type's own comment still sends readers to the wrong error path. - Say that unrecovered filesystem failures propagate as PlatformError. - class: overstated error propagation
    • [LOW] Bug - cli/src/engine-native/ompPaths.ts:7-9,56,95-101, cli/test/unit/ompPaths.test.ts:119 - Unreached: A regular file at $XDG_DATA_HOME/omp on Linux or macOS is adopted, not rejected as a non-directory. I checked the sync and root-tier callers, the documented XDG setup, and the regular-file fixture, which puts the file at the parent component instead. The skill now explains the distinction, but the resolver comments still say it probes directory existence, and the resolver and fixture comments still name FileSystem.exists after the shared helper changed to stat. - Describe the target-following existence check of the final candidate without implying type validation, and name the helper in the fixture comment. - class: existence mistaken for type validation
    • [LOW] Bug - cli/src/engine-native/ompPlugins.ts:246-259, cli/src/engine-native/bridge.ts:26-42 - Unreached: If the verbose sink throws an Error whose message getter returns once and then throws, bridgeSync consumes the first read and the recovery reads it again. The second read turns a recoverable status-write failure into a defect before the warning or inventory probe. That is an inference from the two reads. The live stderr sink, upgrade-log fixtures, and documented verbose path do not supply that error; the analogous getter fixture at cli/test/unit/engine.test.ts:118-133 only drives the CLI seam. - Format the status-write failure once inside its bridged recovery, and let a failure of the warning itself propagate. - class: repeated read of a captured error message
    • [LOW] Maintainability - cli/src/engine-native/ompFileDeploy.ts:72-78, cli/test/unit/syncLock.test.ts:669-720 - The backup-time repair can be reverted without failing the nearby deploy fixture: it creates AGENTS.md before sync and gates the write after the backup decision. The BOM fixture also starts with an existing file. Neither distinguishes a second probe from reusing the first result. - Add a deterministic fixture that creates the target after the comparison probe reports absence and asserts that its original bytes are saved in .bak. - class: missing regression case for backup timing

    Spec

    • [LOW] Spec - cli/src/engine-native/fileText.ts:33-38, cli/src/engine-native/ompPaths.ts:95-101, .agents/skills/omp-sync-context/SKILL.md:96-100 - plan-296-cr2.md:32 still says ompPaths becomes an Effect over FileSystem.exists and directs the skill to name that API as the replacement. The repair uses stat and tells readers not to use FileSystem.exists, consistent with the target-following requirement at plan-296-cr2.md:43. A maintainer following the earlier decision could restore the probe the repair removed. - Align the Paths decision with step 3 and retain the target-following helper. - class: superseded implementation decision left in plan
  14. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 9, delta

    Plan-review: repair

    • goal_fit - Steps repairs_2, Done when (line 44) - The repair now requires a Windows Full CI result before it is complete, but the plan contract requires repairs to be complete before committing the candidate for code review. The repository only requests Full CI after that review, when a maintainer marks the PR ready (AGENTS.md:81, .github/workflows/parity.yml:3-5, plan-manager/references/plan-contract.md, Repairs and Code-review rounds). The proof therefore arrives after the point at which the plan requires it. - Use a pre-review check that exposes the separator mismatch to complete the repair, and retain the Windows shard result as a mandatory landing check. - class: repair completion depends on post-review CI

    Previous findings:

    • Round-8 finding on Steps repairs_2, Done when (line 44): resolved - The current export requires the dangling-link dry-run case itself to pass in the Windows unit shard on the landing candidate. The Linux unit result alone no longer satisfies that criterion.

    Manager response to round 8

    Repaired:

    • Step 4 repairs-2 Done when: the dangling-link dry-run case must also pass in the Windows unit shard of Full CI on the landing candidate; the local unit row stays as a regression guard.

    Rejected: none.

    Redesigned: none.

  15. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 10, delta

    Plan-review: pass

    None.

    Previous findings:

    • Round-9 finding on Steps repairs_2, Done when (line 44): resolved - Step 4 now requires a pre-review comparison that fails without separator normalization. Acceptance windows (line 64) still requires both Windows unit shards, including the dangling-link dry-run case, to pass on the landing candidate.

    Manager response to round 9

    Repaired:

    • Step 4 Done when: a pre-review check (path.win32.join against a slash-joined path, with and without the normalization) completes the repair; the new Acceptance row windows keeps the Windows unit shards of Full CI as the landing check.

    Pre-review check run (2026-12-02): with the expected path built by path.win32.join and a slash-joined printed path, the normalized comparison matches (true) and the raw comparison does not (false).

    Rejected: none.

    Redesigned: none.

  16. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Code review round 3, delta

    Code-review: pass

    Previous findings

    • Round-2 finding on cli/test/unit/ompRemovals.test.ts:418-432: fixed - The comparison at cli/test/unit/ompRemovals.test.ts:433-435 no longer fails solely because the Windows fixture and engine use different separators. The repair weakens the POSIX assertion, as noted below.
    • Round-2 finding on cli/src/engine-native/index.ts:30-35: open - The comment now distinguishes unrecovered filesystem errors, but still describes upgrade-log recovery without its warning-failure condition.
    • Round-2 finding on cli/src/engine-native/ompPaths.ts:7-9,56,95-101 and cli/test/unit/ompPaths.test.ts:119: open - The repaired comments name pathExists and describe the final-candidate probe. Nearby text still implies a directory check.
    • Round-2 finding on cli/src/engine-native/ompPlugins.ts:246-259: deferred - Unreached: The recovery still reads the captured error's message again. The live sink, upgrade-log fixtures, and documented verbose path do not supply the throwing getter. The manager assigned this to a follow-up.
    • Round-2 finding on cli/src/engine-native/ompFileDeploy.ts:72-78 and cli/test/unit/syncLock.test.ts:669-720: deferred - The second probe remains, but the fixture still creates the target before the comparison and pauses after the backup decision. The manager assigned the missing timing regression test to a follow-up.
    • Round-2 Spec finding on plan-296-cr2.md:32: fixed - plan-296-cr3.md:32 now names the target-following pathExists probe, consistent with cli/src/engine-native/fileText.ts:33-38.

    Standards

    • [LOW] Bug - cli/test/unit/ompRemovals.test.ts:432-435 - On POSIX, the repaired assertion would accept a preview that prints backslashes between path components. Inference: if only the preview formatter regresses, the normalized comparison still matches, and the filesystem assertions still pass because the run is read-only. - Compare the raw preview against the fixture root followed by /.omp/agent/config.yml. This preserves the host spelling of the root without accepting the wrong separators in the engine-appended path. - class: output normalization masks a wrong path
    • [LOW] Bug - cli/src/engine-native/index.ts:32-34, cli/src/engine-native/ompPlugins.ts:249-259 - If upgrade-log removal fails and the warning sink throws, the run fails with the bridged logger error. The revised comment says the removal failure "only warns" without that condition. - Drop the parenthetical or say that the removal error is recovered when the warning succeeds. - class: inaccurate error propagation documentation
    • [LOW] Bug - cli/src/engine-native/ompPaths.ts:108,113-119, cli/test/unit/ompPaths.test.ts:109-116, .agents/skills/omp-sync-context/SKILL.md:113-122 - Unreached: A regular file at the final XDG candidate is adopted, but the helper comment, fixture name, and skill still describe adoption as requiring a directory. The sync and root-tier callers pass through the environment, the documented setup uses a directory, and the regular-file fixture at cli/test/unit/ompPaths.test.ts:119-125 puts the file at the parent instead. - Say that the final candidate must exist. Keep the directory wording only for what omp config init-xdg creates and what the fixture sets up. - class: existence mistaken for type validation

    Spec

    None.

    Manager response to round 2

    Repaired:

    • MEDIUM Windows path display in the dangling-link dry-run case: both sides are slash-normalized (commit 06913fa).
    • LOW EngineFailure comment and ompPaths comments: reworded (06913fa).
    • Spec: the plan Paths decision names pathExists (plan round 8 to 10).

    Deferred to the follow-up issue: the Unreached LOW message-getter double read, and the LOW backup-timing regression fixture.

    Rejected: none.

    Redesigned: none.

  17. linked a pull request that will close this issueMove the omp passes to Effect #310on Dec 2, 2026
  18. DocksDocks commented on Dec 2, 2026

    @DocksDocks
    OwnerAuthor

    Archived with landing pull request #310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions