Skip to content

Handle empty OMP tier sections in the fast toggles #284

Done

Description

@DocksDocks

Goal

Let the kit toggle OpenAI tiers when OMP has a valid YAML config with an empty tier:, tier: null, or tier: ~, which OMP reads as no tier setting. Preserve every other setting as OMP reads it: when a rewrite would change another setting, refuse with no write. Continue to reject actual incompatible scalars or sequences.

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

Mode: plan-and-implement

Research

Repository facts

  • At d3731bc, toggleOpenAiTier in cli/src/engine-native/ompFastMode.ts reads the YAML node with doc.get("tier", true) and throws omp config.yml key 'tier' must be a mapping when that node is not a map. For tier:, tier: null, and tier: ~, YAML 2.9.1 returns a Scalar node whose value is null, so the guard rejects a config that OMP 19.2.1 reads as tier.openai: none. tier: {} and an absent tier already succeed.
  • toggleDeployedOpenAiTier (same file) is the only writer. cli/src/commands/omp.ts (toggleTierUnderLocks) checks that config.yml exists, takes the home sync lock and the agent-folder lock, then calls it. The atomic 0600 write is replaceFile in cli/src/engine-native/atomicWrite.ts. The fix changes neither the locks nor the write.
  • Tests: cli/test/unit/ompFastMode.test.ts covers the pure toggle, the symlinked config, the locks, and omp --ultrafast through an in-process Command.runWith(ompCommand). No test starts the real CLI for a toggle. cli/test/lib/cliEntry.ts gives the spawned entry (a bundle of cli/src/main.ts), and cli/test/unit/commandsReporting.test.ts shows the pattern: spawnSync(BUN_RUNTIME, [cliEntry(), ...args], { env: childEnv({ HOME, USERPROFILE, ... }) }).
  • Comments: an experiment in the plan scratch directory (bun script over parseDocument) showed that the null scalar holds a trailing comment (tier: null # keep me gives comment: " keep me"). doc.set("tier", map) after doc.createNode({}) keeps the key and its leading comment; copying comment and commentBefore from the scalar to the new map keeps the value comment (it prints inside the new block). A quoted 'null' is a string scalar, not a null, and stays rejected.
  • doc.setIn(["tier", "openai"], …) throws on a scalar intermediate (dist/nodes/Collection.js setIn), so the scalar must be replaced before the set.
  • OMP's reader differs from the kit's YAML writer: OMP reads config.yml with Bun's YAML parser, while the kit edits it with YAML 2.9.1 and writes the whole document with doc.toString() (also at the base, for every toggle of an existing tier mapping). Experiments in the plan scratch directory found these disagreements: anchor.ts (replacing an anchored null makes toString throw Unresolved alias), alias-binding.ts and anchored-refusal.ts (Bun and YAML 2.9.1 bind a repeated anchor name differently: Bun.YAML.parse read astGrep.enabled as null, YAML 2.9.1 bound *a to the enclosing map), a verbatim-tagged null (Bun.YAML.parse read tier: !<tag:yaml.org,2002:null> null as the string "null", !!null as null), and verbatim-base.ts (on the base d3731bc9, toggling tier: {} beside label: !<tag:yaml.org,2002:int> 123 printed label: !!int 123, and Bun then read the label as the number 123 instead of the string "123"). Bun also reads tier: *a (with unset: &a null) and an empty tier: !custom as null, where YAML 2.9.1 holds an alias node or a string scalar. OMP also migrates a legacy serviceTier key after it parses the file (OMP 19.2.1 config/settings.ts): only when tier has no openai key, the values priority, openai-only, auto, default, flex, and scale set tier.openai (priority also sets tier.anthropic and tier.google, claude-only sets only tier.anthropic), and other values are dropped. So the raw tier.openai is not the effective OpenAI tier while such a value is active. The prototype omp-view-guard-3.ts classifies tier by Bun.YAML.parse, replaces the writer node when Bun reads tier as null, re-reads the result with Bun.YAML.parse, and compares it with the expected reading by value (Object.is for scalars, so .inf, NaN, and -0 compare exactly; a map of visited object pairs ends the walk at a cyclic alias, which Bun's reader supports). OMP reads some maps by key order: the retry fallback chains take the first matching key (OMP 19.2.1 session/retry-fallback-chains.ts), so mapping keys must compare in order. The prototype kept only the latest partner of each visited object, which overflows the stack when a two-node cycle meets a one-node cycle with the same values; the comparison must record every visited pair. Bun keeps alias identity (one object for an anchor and its aliases), and OMP's settings migration changes some objects in place (OMP 19.2.1 config/settings.ts: the legacy search.enabled migration writes into the existing grep object), so a rewrite that splits or joins shared objects can change a setting that the values alone do not show. The comparison therefore pairs each object of the old reading with exactly one object of the new reading in both directions; a rewrite that turns a two-node cycle into a one-node cycle, or that rebinds an alias so that two settings stop sharing one object, is refused. The round-9 cases (round9-cases.ts, output round9-cases.out, on the Step 2 code): an anchor name that the rewrite moves to an earlier fallback-chain key is refused, the two-node versus one-node cycle compares equal and toggles, and serviceTier: &old priority beside tier: { advisor: *old } is refused as a legacy tier. Its output omp-view-guard-3.out: toggled tier:, tier: null, tier: ~, tier: !!null, tier: !custom, tier: *a, and an unused anchored null; refused the verbatim-tagged null, tier: 5, and a list as not a mapping; refused serviceTier: openai-only beside tier: null; toggled serviceTier: none and serviceTier: claude-only beside tier: null, serviceTier: priority beside an explicit tier.openai, and tier: null beside a cyclic metadata: &m { self: *m }; and refused the anchored null with an alias (not serializable), both verbatim-tagged labels, and the repeated-anchor case with .inf (rebinding warn from null to infinity) as rewrites that change other settings.
  • Spawned runs: childEnv in cli/test/lib/goldenResources.ts inherits each variable that it does not override, and cli/src/engine-native/ompPaths.ts resolves the agent folder from PI_CODING_AGENT_DIR, OMP_PROFILE, PI_PROFILE, and PI_CONFIG_DIR. The spawned test sets each of them to an empty value, so the child resolves <temporary home>/.omp/agent, which the in-process tests also assume (fastHome stubs the same four keys).
  • package.json is 0.31.3. Root AGENTS.md asks for a version bump on a user-visible behavior change and a payload regeneration (bun cli/scripts/generate-sot-payload.ts) after a package.json change; bun run check:generated verifies it. The talk bundle SoT/.omp/plugin/extensions/talk.js embeds the package version (cli/talk/extension.ts), and check:generated also runs bun cli/scripts/build-talk.ts --check, so the bump needs bun cli/scripts/build-talk.ts before the payload regeneration. Root AGENTS.md also asks to verify user-facing changes with ./docks-kit sync --dry-run and bun run smoke:package. CHANGELOG.md entries start ## <date> - docks-kit <version>: <summary>.
  • Replace the free-model wrapper with top-level fast tier flags #283 moves the toggles to root flags docks-kit --fast and docks-kit --ultrafast. This plan keeps the current docks-kit omp --fast entry point. When Replace the free-model wrapper with top-level fast tier flags #283 lands first, this branch merges the default branch, moves the spawned test to the root flag, and takes the next patch version over the merged version.

Tool facts

  • Bun 1.4.5: bun --version on 2026-12-01, and the SoT/toolchain.json pin.
  • Node.js v26.13.0: node --version on 2026-12-01. bunx vitest starts Vitest through its #!/usr/bin/env node shebang, so the focused rows and the gate run Vitest on this Node.js; vitest --version printed vitest/5.1.2 linux-x64 node-v26.13.0.
  • YAML 2.9.1 and Vitest 5.1.2: exact pins in package.json.
  • OMP: SoT/toolchain.json verifies 19.2.1; omp --version printed omp/19.4.0 on 2026-12-01. The rebuilt talk bundle carries the bumped version into the extension factory's compatibility check (cli/talk/extension.ts), so Acceptance talk loads the linked plugin in an isolated omp with bun .agents/skills/verify/scripts/omp-smoke.ts (verify skill V6, load mode). The smoke spawns a bare docks-kit from PATH for scratch new and scratch remove (.agents/skills/verify/SKILL.md prerequisites); on this host that is the global Bun install of the published package (command -v docks-kit names the Bun global bin folder; docks-kit --version printed 0.31.3 on 2026-12-01). The smoke links the checkout's SoT/.omp/plugin, so the rebuilt bundle is the one it loads.
  • Host tools for the Linux acceptance rows, versions read on 2026-12-01: GNU Bash 5.3.0 and uutils coreutils 0.10.0 dirname and uname (./docks-kit is a Bash script that calls both), /bin/sh (dash), GNU tar 1.35 with gzip 1.14 (package-smoke.ts lists the gzipped tarball), GnuPG 2.4.8 with gpgconf and gpg-connect-agent 2.4.8, Git 2.53.0, util-linux script 2.41.3, and ps 0.2.0. bun run check also runs the pinned @effect/tsgo 0.74.1 (effect-tsgo) and oxlint 1.95.0 from package.json. test:unit includes the review-benchmark project on Linux; root AGENTS.md (Testing) states that it needs git, gpg, GNU tar, script, and full history with origin/main. This checkout is not shallow (git rev-parse --is-shallow-repository printed false).
  • Effect 4.1.7 (node_modules/effect/package.json): its shipped AGENTS.md asks for Schema.TaggedError errors in the error channel, an error with a tagged reason union for one failure with several causes (ai-docs/src/01_effect/04_errors/20_reason-errors.ts), Effect.fn and Effect.fnUntraced for reusable functions, Context.Service with a static layer for dependencies, and the Predicate module instead of local isRecord guards. Predicate.isObject is a non-null, non-array object check (src/Predicate.ts). The FileSystem service (exists, readFileString) comes from BunServices.layer, which main.ts already provides. The 36 files of cli/src/engine-native/ import no effect module; plan Move the engine-native layer to Effect #290 moves that layer. syncDispatch.ts withHomeAndFolderLocks takes an async body and has one caller, the root tier toggle (cli/src/commands/root.ts after Replace the free-model wrapper with top-level fast tier flags #283).

Decisions

  • Question: how the toggle keeps every other setting as OMP reads it, given that the kit's writer and OMP's reader disagree on anchors and tags.
    • Options: (a) classify tier and check the result with OMP's own parser (Bun.YAML.parse): refuse with exit 2 and no write when the rewrite changes any setting other than tier.openai or cannot be serialized; (b) refuse each known disagreement by its YAML form (anchored null, tagged null) and keep the whole-document write; (c) edit only the text span of tier and leave the other bytes; (d) rewrite aliases or move the anchor.
    • Evidence: omp-view-guard-3.ts (above) covers every reported form with (a), with a lossless value comparison (a JSON.stringify comparison maps .inf and NaN to null and missed the .inf rebinding); (b) leaves the verbatim-tagged label of verbatim-base.ts changed, and its anchor display needed escape rules that two review rounds found incomplete; (c) needs a hand-written YAML block editor for flow and block mappings, indentation, and comments; (d) changes alias values (rounds 1 to 3 of plan review).
    • Failure modes: (a) a config with a form that the two parsers read differently cannot be toggled until the user edits tier.openai by hand; the refusal names that recovery. (b) silent changes to other settings stay. (c) new editing defects in a parser of its own. (d) silent value changes.
    • Reversibility: (a) writes nothing on a refusal; the check uses the parser that already runs the CLI. (b), (c), and (d) can write a changed config.
    • Durability: (a) fixes the class for every toggle, not only the null forms: the base whole-document write is checked too. It replaces the anchor and tag special cases and their escaped anchor display. The comparison pairs objects one to one, so a cyclic alias that the rewrite keeps does not block a toggle, and a rewrite that changes which settings share an object is refused.
    • Pre-mortem: a user reports a refusal on a config that they never edited by hand. Guard: the message names the cause and the recovery without an anchor name, and docks-kit sync never writes the forms that trigger it (the SoT uses no anchors, tags, or serviceTier).
    • Choice: (a). toggleOpenAiTier(configText, onTier, readYaml) takes the reader as a parameter, and toggleDeployedOpenAiTier passes Bun.YAML.parse, the reader of the Bun runtime that runs the CLI. The comparison of OMP's readings is by value, key order, and object sharing. Vitest runs on Node.js, so the pure tests pass YAML 2.9.1 parse, every Node.js test that calls toggleDeployedOpenAiTier (the symlink test and the in-process command tests) stubs the Bun global with vi.stubGlobal("Bun", { YAML: { parse } }) (YAML 2.9.1 again) and restores it after each test, and only the spawned tests run the real Bun reader; so each disagreement case is a spawned test. The previous tier comes from OMP's reading. When OMP reads tier as null, the writer node (a scalar of any tag or anchor, or an alias) becomes a new map that keeps a scalar's comments; a tier that OMP reads as a string, a number, or a list keeps the mapping error. A root serviceTier that sets the effective OpenAI tier (one of OMP's legacy values above while tier has no openai key) refuses with omp config.yml sets the OpenAI tier through the legacy key 'serviceTier'; replace it with the tier values that omp derives from it (for each provider it sets), replace each alias of serviceTier with its value, then retry, and the file stays as it is; an ignored legacy value or an explicit tier.openai goes through the rewrite check, which keeps serviceTier and every other provider tier as OMP reads them. The refusal of a changed or unserializable rewrite reads omp config.yml cannot be rewritten without changing other settings that omp reads (a YAML anchor, alias, or tag that the parsers read differently); first replace each alias of an anchor on tier with its value, then set tier.openai to <next> by hand. Rejected: (b), (c), and (d) for the reasons above; deriving the effective tier from OMP's legacy migration rules, because it copies OMP internals that can change in any release.
  • Choice: prove the CLI with one spawned run of the bundled entry in a temporary home, in cli/test/unit/ompFastMode.test.ts. Rejected: a new flow in .agents/skills/verify/SKILL.md, because a spawn test already starts the real surface, runs in every gate, and Replace the free-model wrapper with top-level fast tier flags #283 changes this entry point next.
  • Choice: a patch bump, the next patch version over the version of the landing base (0.31.4 over the current 0.31.3), used the same in package.json, the changelog entry, and the payload. Reason: the change fixes a refusal and adds no surface. Rejected: 0.32.0, because no new flag or command is added; a fixed 0.31.4, because Replace the free-model wrapper with top-level fast tier flags #283 can bump the base first.
  • Question: how the toggle reports its refusals, given the user request to follow Effect practice. Choice: the Step 3 design, with one TierToggleError whose tagged reason names each refusal, because one failure with several causes is the shipped reason-error pattern and the command exits 2 for every reason. A read or write failure is not a refusal: it exits 1, where the current catch-all exits 2. The locks become a scoped Effect, so the toggle runs inside them as an Effect with no Effect.run* in library code. Rejected: one error class per refusal, because each would need its own handler with the same exit code; a plain function that returns a Result inside the async lock body, because the errors would stay outside the Effect channel; moving all of engine-native now, because sync, toolchain, tidy, scratch, and the kit store are outside this goal (plan Move the engine-native layer to Effect #290 holds them). Reversibility: one revertable commit; output and exit codes of the refusals stay the same.

Request corrections

  • Asked: acceptance bun run test:unit:portable for the CLI proof. Did: a focused bunx vitest run cli/test/unit/ompFastMode.test.ts row for the behavior, and the full gate row for every unit test. Reason: the full unit project adds no proof for this path and runs inside bun run check.
  • Asked: toggle the tiers when config.yml has an empty tier: or tier: null. Did: toggle every tier that OMP reads as null, and refuse, with no write, a config whose legacy serviceTier key sets the effective OpenAI tier and any toggle whose rewrite would change another setting that OMP reads, also for an existing tier mapping. Reason: Research "OMP's reader differs from the kit's YAML writer": the whole-document write can change anchors, aliases, and tags that OMP's Bun parser reads differently, and OMP migrates an active serviceTier after it parses the file.
  • Asked (after plan round 9): "shouldnt we map the errors so its easier?", then "cant we make everything effect? following its best practices"; the user chose the toggle path now and the rest of engine-native later. Did: Step 3 moves the toggle path to Effect typed errors, services, and scoped locks; plan Move the engine-native layer to Effect #290 holds the rest of engine-native. Reason: the user's choice in this session.

Engineering standards

  • Step 1 applies fix-workflow (regression test first, then the fix), code-clarity (error text and comments), and commit-discipline (one commit with a Verified: trailer).
  • Step 3 applies effect-ts (installed Effect 4.1.7 names only, effect-tsgo diagnostics in check:types) and type-safety-discipline (tagged reason union, no local record guard).

Steps

# Id Task Files Depends Effect Status Done when
1 null_tier Write the regression tests first: pure toggles of tier:, tier: null, and tier: ~ (with a comment on the value) on and off; an anchored null tier refused; tier: 5, tier: 'null', a sequence, and tagged nulls refused; the refusals also through the omp command with exit 2 and an unchanged file; and one spawned docks-kit omp --fast run in a temporary home on tier: null, with the four agent-folder variables set empty. Then replace only an untagged, anchor-free null tier scalar with a map that keeps its comments, before the existing setIn. Bump to the next patch version over the landing base, add the changelog entry, rebuild the talk bundle, regenerate the payload, regenerate the mutation golden with bun cli/test/golden-mutation.ts --update-goldens, and run bun run format. cli/src/engine-native/ompFastMode.ts, cli/test/unit/ompFastMode.test.ts, CHANGELOG.md, package.json, SoT/.omp/plugin/extensions/talk.js, cli/src/generated, cli/test/goldens/mutation.json - local done The new tests fail before the fix and pass after it; untagged, anchor-free null tiers toggle on and off with unrelated keys and comments kept; an anchored or tagged null, a non-null scalar, and a sequence exit with their error and an unchanged file; the mutation golden holds the new bundle and manifest hashes.
2 omp_view_guard Repair for code-review round 2 and plan rounds 6 and 7: write the spec tests first, then take the reader as a parameter of toggleOpenAiTier, classify tier and derive the previous tier by OMP's reading, replace the writer node when OMP reads tier as null, refuse a root serviceTier that sets the effective OpenAI tier, re-read the rewrite and compare it losslessly with the expected reading (mapping keys in order, each object paired with exactly one object of the other reading in both directions), and refuse a changed or unserializable rewrite with the recovery message; drop the anchor and tag special cases and the anchor display. Stub the Bun global in every Node.js test that calls toggleDeployedOpenAiTier. Spawned cases (real Bun reader): tier: null toggles; tier: !!null, tier: !custom, and tier: *a toggle; the anchored null with an alias, the verbatim-tagged null tier, the verbatim-tagged label beside tier: null and beside tier: {}, the repeated-anchor case with .inf, and serviceTier: openai-only beside tier: null each exit 2 with their message and an unchanged file; serviceTier: none beside tier: null, serviceTier: priority beside an explicit tier.openai, and tier: null beside a cyclic alias toggle with serviceTier and the other keys kept; serviceTier: &old priority beside tier: { advisor: *old } and an anchor name that the rewrite moves to an earlier fallback-chain key exit 2; a rewrite that turns a two-node cycle into a one-node cycle and a rewrite that splits the object shared by grep and glob beside search: { enabled: false } exit 2. The legacy refusal also tells users to replace each alias of serviceTier with its value. Update the changelog entry, then rerun the generated, golden, and gate checks. cli/src/engine-native/ompFastMode.ts, cli/test/unit/ompFastMode.test.ts, CHANGELOG.md 1 local done The spawned and pure cases pass and each new spawned case whose outcome or message Step 2 changes fails on the step-1 code, and the verbatim-tagged null tier (refused as not a mapping by both steps) stays a regression guard; no test or code path names an anchor or a tag rule; the changelog describes the reader check and the refusal of an active legacy serviceTier; Verification Results record the focused and gate results for the repaired head.
3 effect_toggle User request after plan round 9: move the toggle path to Effect 4. After #283 lands, merge origin/main into the branch and move the Step 1 and 2 behavior onto the root docks-kit --fast and --ultrafast handler in cli/src/commands/root.ts (the nested omp command is gone). Write the spec tests first. In ompFastMode.ts: a TierToggleError Schema.TaggedError whose reason is a union of Schema.TaggedError reasons (ConfigMissing, InvalidConfigYaml, ConfigRootNotMapping, TierNotMapping, LegacyServiceTier, RewriteChangesSettings), each with its current message text; an OmpYamlReader Context.Service whose read returns an Effect that fails with a typed parse failure instead of throwing, and whose static layer reads with Bun.YAML.parse; main.ts provides OmpYamlReader.layer at the entry beside BunServices.layer, and the tests provide a layer over YAML 2.9.1 parse; toggleOpenAiTier as Effect.fnUntraced over the reader, where a failure to read the original text is InvalidConfigYaml and a failure of the YAML edit, the serialization, or the reread of the rewrite is RewriteChangesSettings (all through Effect.try or the reader's typed failure, never a defect); requireDeployedConfig and toggleDeployedOpenAiTier as Effect.fn over FileSystem, with the atomic replaceFile write wrapped in Effect.try to a ConfigWriteError that prints the write error and exits 1; cli/tsconfig.json adds effect/FileSystem#FileSystem to allowedUnstableApis (the diagnostic stays on); Predicate.isObject instead of the local guard. In syncDispatch.ts: homeAndFolderLocks, a scoped Effect that replaces withHomeAndFolderLocks. It reads the wait bound once and fails with LockWaitInvalid (the one existing diagnostic line, exit 2) for an invalid DOCKS_KIT_SYNC_LOCK_WAIT_MS. It takes the home lock, then each folder lock, each with its own Effect.acquireRelease (acquisition uninterruptible by default), so each acquired lock is released when a later lock is held, the run fails, or Ctrl+C interrupts it. kitLock.ts gains a synchronous one-try export tryAcquireKitLock(path, { privateDirectory }): it returns the lock, closes its connection and returns undefined only for contention (tryBegin reports SQLITE_BUSY), and on any other failure (for example a lock path that is a folder) closes the connection it opened and throws. acquireKitLock and tryAcquireKitLock share one extracted connection setup (folder mode, open, busy_timeout = 0) and tryBegin. The Effect acquire wraps the try, and the folder resolution and creation before it (folderLockPaths with realpathSync.native, and mkdirSync), in Effect.try to a LockAcquireError (path and cause), in the same lock order, which root.ts prints as the error line and exits 1, inside the same uninterruptible acquire. The Effect acquire polls that try until the wait bound ends, with Clock for the deadline and Effect.interruptible(Effect.sleep(…)) between tries, so Ctrl+C can interrupt only the sleep, when no lock of this try is held, and a successful try and its finalizer cannot be separated. A held lock fails with KitLockHeld after the existing held line (exit 1). withKitLocks for sync keeps its behavior and shares the folder creation and the held line with it. In root.ts: Effect.scoped over the locks and the toggle, Effect.catchTags for TierToggleError (exit 2 with reason.message), LockWaitInvalid (exit 2), KitLockHeld (exit 1), LockAcquireError (exit 1), and ConfigWriteError (exit 1), and no try or Effect.run*. Tests provide the reader layer over YAML 2.9.1 parse instead of stubbing the Bun global and assert the reason tag; one test per reason checks its message. Bump to the next patch over the landing base, update the changelog entry, rebuild the talk bundle, regenerate the payload and the mutation golden, and run bun run format. cli/test/unit/folderLockCreate.test.ts moves its folder-creation check to homeAndFolderLocks. Because the shared connection setup also serves docks-kit tidy --apply, cli/test/unit/tidy.test.ts gains one spawned run of the public docks-kit tidy --apply in a temporary home whose tidy lock another connection holds: it prints another docks-kit tidy run holds <path>, exits 0, and changes nothing. cli/src/engine-native/ompFastMode.ts, cli/src/engine-native/syncDispatch.ts, cli/src/engine-native/kitLock.ts, cli/src/commands/root.ts, cli/src/main.ts, cli/tsconfig.json, cli/test/unit/ompFastMode.test.ts, cli/test/unit/rootFlags.test.ts, cli/test/unit/folderLockCreate.test.ts, cli/test/unit/tidy.test.ts, cli/src/engine-native/errorText.ts, cli/src/engine-native/tidy.ts, cli/src/engine-native/tidyReport.ts, cli/docs/flags.md, .agents/skills/omp-sync-context/SKILL.md, .agents/skills/sync-orchestration-context/SKILL.md, .agents/skills/tidy-context/SKILL.md, CHANGELOG.md, package.json, SoT/.omp/plugin/extensions/talk.js, cli/src/generated, cli/test/goldens/mutation.json 2 local done The Step 1 and 2 cases pass through the root flags with the same output and exit codes; a write failure exits 1 with its write error and leaves config.yml unchanged, not 2 (fixture, skipped on Windows and for root as goldenSnapshot.test.ts does, because Windows ignores a read-only folder and root ignores the mode: the agent folder and both lock folders stay writable, and config.yml is a symlink to a file in a mode-0500 folder, so replaceFile fails at its temporary file); an invalid DOCKS_KIT_SYNC_LOCK_WAIT_MS still prints its one line and exits 2; a held lock still exits 1 with the held line and releases the home lock; no try, instanceof Error, local record guard, or Bun global stub remains on the toggle path; effect-tsgo reports no Effect diagnostic; Verification Results record the focused and gate results for the repaired head.

Acceptance

ID Command Expected
fast bunx vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts Exit 0, and the verbose report lists as passed: the spawned docks-kit --fast runs (the root flag after #283 lands; the bundled cli/src/main.ts entry in a temporary home with the agent-folder variables empty turns tier: null, tier: !!null, tier: !custom, and tier: *a into tier.openai: priority with exit 0 and keeps the other keys; and the anchored null with an alias, the verbatim-tagged null tier, the verbatim-tagged label beside tier: null and beside tier: {}, the repeated-anchor case with .inf, and serviceTier: openai-only each exit 2 with their message and the file unchanged; and serviceTier: none, serviceTier: priority beside an explicit tier.openai, and a cyclic alias beside tier: null toggle with exit 0 and the other keys kept); the pure toggles of tier:, tier: null, and tier: ~ with their comments kept; and the command refusals of tier: 5, tier: 'null', and a sequence with exit 2 and the file unchanged. After Step 3, the report also lists one passed message test per TierToggleError reason and the exit-1 case for a write failure at the atomic replacement (writable agent and lock folders, config.yml linked to a file in a mode-0500 folder), with the write diagnostic and config.yml unchanged: passed on an unprivileged POSIX run, reported as skipped on Windows and as root. The tidy row below covers the shared lock setup.
gen bun run check:generated Exit 0: the payload and the talk bundle hold the bumped version from package.json.
golden bun run golden:mutation golden-mutation: OK with every case passing against the regenerated mutation.json.
talk bun .agents/skills/verify/scripts/omp-smoke.ts Exit 0, talk tool: offered, and warnings: 0: the rebuilt bundle loads in an isolated omp.
dry ./docks-kit sync --dry-run Exit 0, and each preview line starts with [dry-run].
smoke bun run smoke:package Exit 0: the packed tarball installs in a clean folder and its CLI runs.
tidy bunx vitest run --reporter=verbose cli/test/unit/tidy.test.ts cli/test/unit/folderLockCreate.test.ts Exit 0 after Step 3; the report lists as passed the spawned docks-kit tidy --apply run under a held tidy lock (the held line, exit 0, nothing changed) and the folder-creation cases of homeAndFolderLocks.
ci-tools bun cli/scripts/verify-ci-tools.ts Exit 0 after Step 3, with the line check:types: plain error, Effect warning, Effect error and corrected program passed: with the changed cli/tsconfig.json, the planted plain error, Effect warning, and Effect error each make check:types fail, and the clean program passes (root AGENTS.md, Testing).
gate bun run check Exit 0: lint, types, format, generated files, unit tests, and both golden suites pass.

Do not touch

Do not change OMP upstream validation, tier names, provider credentials, or the default path for real user profiles.

Open questions

Verification Results

Reproduced on Linux with published docks-kit 0.31.3. In a temporary HOME, set .omp/agent/config.yml to tier: null; omp config get tier.openai prints none (exit 0), while docks-kit omp --fast prints omp config.yml key 'tier' must be a mapping (exit 2) and leaves bytes unchanged. A mapping with openai: none successfully toggles priority/ultrafast/none. OMP's own config write was not verified because the cloud environment refused its native file lock.

Candidate d3af7119 on Linux x64, 2026-12-01:

  • Red baseline, step null_tier: bunx vitest run cli/test/unit/ompFastMode.test.ts: 6 failed, 24 passed (the three null forms, the null-value comment, the anchored-null refusal message, and the spawned tier: null run; each failed on its assertion).
  • fast: bunx vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts: exit 0, 30 passed; the report lists spawned docks-kit omp --fast > turns fast on for a deployed config.yml with tier: null and keeps the other keys and refuses a null tier that carries an anchor and names the recovery as passed.
  • gen: bun run check:generated: exit 0; talk.js is current.
  • golden: bun run golden:mutation: golden-mutation: OK (13 case(s)).
  • talk: bun .agents/skills/verify/scripts/omp-smoke.ts: exit 0, skills: 34, talk tool: offered, warnings: 0 (omp 19.4.0).
  • dry: ./docks-kit sync --dry-run: exit 0; every preview line starts with [dry-run], then the Sync complete summary.
  • smoke: bun run smoke:package: exit 0, clean-room consumer install passed.
  • gate: bun run check: exit 0; 6468 unit tests passed, 12 skipped; golden-dryrun: OK (12 case(s)); golden-mutation: OK (13 case(s)).

Candidate e768d132 (Step 2 omp_view_guard) on Linux x64, 2026-12-01:

  • Red baseline, Step 2: the Step 2 test file on the Step 1 code 28b70a9b, spawned cases only: 12 failed, 5 passed. Failed (outcome or message changed by Step 2): tier: !!null, tier: !custom, and tier: *a toggles; the anchored null with an alias; the split shared object; the two-node to one-node cycle; both verbatim-tagged labels; the repeated anchor with .inf; serviceTier: openai-only; the aliased legacy serviceTier; the fallback-chain key order. Passed as regression guards: tier: null, the ignored serviceTier, serviceTier beside an explicit tier.openai, the kept cyclic alias, and the verbatim-tagged null tier.
  • fast: bunx vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts: exit 0, 60 passed, the spawned success and refusal cases among them.
  • gen: bun run check:generated: exit 0.
  • golden: bun run golden:mutation: exit 0.
  • gate: bun run check: exit 0; 6498 unit tests passed, 12 skipped; golden-dryrun: OK (12 case(s)); golden-mutation: OK (13 case(s)).
  • Step 2 changes no file under SoT/ and no version, so the talk, dry, and smoke results of d3af7119 still hold for it.

Merge 324c7cdc of origin/main (820d4faf, #283) into the branch: version resolved to 0.32.1; the toggle tests moved to the root --fast flag; bunx vitest run cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts 64 passed; check:generated, golden:mutation, and check:types exit 0.

Candidate bf62e2bf (Step 3 effect_toggle) on Linux x64, 2026-12-01:

  • Red baseline, Step 3: the Step 3 test files (ompFastMode.test.ts, folderLockCreate.test.ts, tidy.test.ts) on 324c7cdc: 48 failed, 68 passed. The failures are the missing Step 3 API (homeAndFolderLocks is not a function, readYaml is not a function, no OmpYamlReader), so the write-failure case fails before its exit-code assertion; on 324c7cdc that failure exits 2 through bail (cli/src/commands/root.ts, default code 2) [INFERENCE from the code, not run].
  • fast (with rootFlags.test.ts): exit 0, 69 passed, with one passed message test per TierToggleError reason (ConfigMissing through the command, InvalidConfigYaml from each parser, ConfigRootNotMapping, TierNotMapping, LegacyServiceTier, RewriteChangesSettings), and the write failure at the atomic replacement: exit 1, EACCES, config.yml unchanged (unprivileged POSIX run).
  • tidy: bunx vitest run --reporter=verbose cli/test/unit/tidy.test.ts cli/test/unit/folderLockCreate.test.ts: exit 0, 55 passed, with the spawned docks-kit tidy --apply under a held tidy lock (held line, exit 0, no change), the folder creation, the held folder lock that releases the home lock, the interrupt during the wait that releases the home lock, and the invalid wait bound.
  • ci-tools: bun cli/scripts/verify-ci-tools.ts: exit 0, check:types: plain error, Effect warning, Effect error and corrected program passed.
  • gen: exit 0. golden: golden-mutation: OK (13 case(s)).
  • talk: bun .agents/skills/verify/scripts/omp-smoke.ts: exit 0, talk tool: offered, warnings: 0.
  • dry: exit 0. smoke: bun run smoke:package: exit 0.
  • gate: bun run check: exit 0; 6439 unit tests passed, 12 skipped; golden-dryrun: OK (12 case(s)); golden-mutation: OK (13 case(s)).
  • Paths outside the Steps Files cells: cli/docs/flags.md (the root flag exit codes), .agents/skills/omp-sync-context/SKILL.md and .agents/skills/sync-orchestration-context/SKILL.md (they named withHomeAndFolderLocks); skillMetadata.test.ts passes.

Candidate 143700c2 (code-review round 3 repairs) on Linux x64, 2026-12-01:

  • fast (with rootFlags.test.ts): exit 0, 75 passed, with the new CLI-boundary cases (invalid wait: exit 2 and no lock file; a folder at the home lock path: exit 1 with cannot take the lock <path>; config.yml as a folder: exit 1), the another value display, the typed ConfigMissing reason, the aliased-null comment, and the spawned unresolved-alias refusal.
  • tidy: exit 0, 55 passed, with the interrupt test that first proves the run holds the home lock.
  • ci-tools: exit 0. gen: exit 0. golden: golden-mutation: OK (13 case(s)). dry: exit 0. smoke: exit 0.
  • gate: the first bun run check failed only skillMetadata.test.ts (the tidy-context range named line 1279 of tidy.ts, now 1276 lines; clamped). The second failed only the two timing cases of ompTriggerBackstop.test.ts (regex scaling over the 100 ms ceiling while the machine was loaded); this change touches no trigger rule, and the file alone passed 2 of 2. The third bun run check: exit 0; 6445 unit tests passed, 12 skipped; both golden suites OK.

Candidate 24e1320f (code-review rounds 4 to 7 repairs) on Linux x64, 2026-12-01:

  • fast (with rootFlags.test.ts): exit 0, 80 passed, with the ConfigChanged cases (another writer during the check, a same-length edit and a byte order mark at a pinned time), the ConfigMissing case when the file goes away during the check, the escape of terminal controls, and SQLite's cause on a lock failure.
  • tidy (with folderLockCreate.test.ts): exit 0, 55 passed; the interrupt test requires the held home lock and an interrupt within 2 seconds.
  • ci-tools: exit 0, check:types: plain error, Effect warning, Effect error and corrected program passed (with effect/PlatformError#PlatformError added to allowedUnstableApis).
  • gen: exit 0. golden: golden-mutation: OK (13 case(s)). dry: exit 0. smoke: exit 0, [package-smoke] clean-room consumer install passed. talk: exit 0, talk tool: offered, warnings: 0.
  • gate: bun run check: exit 0; 6450 unit tests passed, 12 skipped; golden-dryrun: OK (12 case(s)); golden-mutation: OK (13 case(s)).

Activity

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

    @DocksDocks
    OwnerAuthor

    Delegation grant: yolo: "check all open issues and solve them please."

  3. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 1

    Plan-review: repair

    • goal_fit - Goal, Research Decisions, and Steps null_tier - [Inference] With tier: &unset null followed by fallbackChains: *unset, the toggle should succeed and leave fallbackChains null. The proposed replacement copies comments but drops the anchor: YAML 2.9.1's YAMLMap.add replaces the node, and Alias.toString then rejects the unresolved alias when ompFastMode.ts serializes the document. Copying the anchor to the map instead would change fallbackChains from null to a mapping. - Preserve the null values of aliases bound to the old scalar before replacing it, and cover that case in the preservation regression. - class: node replacement breaks references from unrelated YAML
    • security_risk - Research’s spawn pattern, Steps null_tier, and Acceptance fast and e2e - [Inference] A runner with PI_CODING_AGENT_DIR pointing to a real config can toggle that config instead of the fixture. cli/test/lib/goldenResources.ts:342-350 inherits variables not explicitly overridden, cli/src/engine-native/ompPaths.ts:54-89 can resolve the agent folder outside the temporary home, and cli/src/commands/omp.ts:250-270,314-322 writes to that resolved folder. The fixture assertion would fail only after the real config changed. - Explicitly pin the spawned command to the fixture agent directory and neutralize inherited OMP profile and config overrides. - class: mutating subprocess inherits a real profile target
    • goal_fit - Acceptance gate - AGENTS.md:71 requires both ./docks-kit sync --dry-run and bun run smoke:package for user-facing changes. package.json:29-48 shows that bun run check runs neither, so every listed row can pass without those required checks. - Add both required checks and their expected results to Acceptance. - class: required repository check missing from Acceptance
    • goal_fit - Research’s Replace the free-model wrapper with top-level fast tier flags #283 merge-order note and version decision, Steps null_tier, and Acceptance gen - [Inference] If Replace the free-model wrapper with top-level fast tier flags #283 lands first, moving the flags is itself a user-visible change and requires a bump from the current 0.31.3 under AGENTS.md:52. Updating only the spawn test while retaining the fixed 0.31.4 target would reuse or lower the version instead of bumping it. - Keep the patch decision, but compute the patch version from the updated landing base and use it consistently in the manifest, changelog, payload, and Acceptance. - class: fixed version target ignores a planned concurrent bump
    • research_gap - Research Tool facts and Acceptance fast, e2e, and gate - The plan records Bun and Vitest versions but not Node. Bun’s bunx docs say it respects the shebang, and Vitest 5.1.2 uses Node with a declared engine range. package.json:38,46-48 also invokes Vitest from the full gate. A Bun-only environment matching the recorded tool facts cannot run the focused checks as written. - Record the supported Node version used for Acceptance and its source. - class: required test runtime missing from tool facts
  4. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 2

    Plan-review: repair

    • goal_fit - Research “Anchors” and Decisions, Steps null_tier, Acceptance fast - The round 1 alias finding remains open. [Inference] The new rewrite handles the single-anchor example but matches Alias.source by name. YAML 1.2.2 and YAML 2.9.1 Alias.resolve bind an alias to the most recent preceding anchor with that name. With tier: &shared null, then autoResume: &shared false, then git: { enabled: *shared }, the toggle should leave git.enabled false. The planned rewrite changes it to null. It also rewrites aliases bound to earlier same-name anchors before tier. - Replace only aliases that resolve to the exact tier scalar before changing it, and make the existing anchor regression distinguish those aliases from aliases bound to another node. - class: alias replacement matches anchor names instead of node bindings
    • goal_fit - Goal, Research “Anchors” and Decisions, Steps null_tier, Acceptance fast - [Inference] With tier: &unset null and autoResume: *unset # keep this, the planned plain null replacement preserves the value but drops the unrelated comment. YAML 2.9.1 composeAlias stores the comment on the alias itself, not on the tier scalar whose comments the plan copies. - Preserve the replaced alias node’s comments too, and assert their survival in the existing anchor regression. - class: alias replacement drops unrelated comments
    • goal_fit - Research version decision, Steps null_tier Task and Files, Acceptance gen, smoke, and gate - [Inference] Bumping package.json and regenerating only the payload leaves SoT/.omp/plugin/extensions/talk.js stale. cli/talk/extension.ts:18,80 embeds the package version in that bundle, and cli/scripts/generate-sot-payload.ts:85-95 embeds the checked-in bundle as-is. cli/scripts/build-talk.ts:565-586 compares it to a fresh build, so check:generated fails, which also fails the gate and package smoke’s prepack (package.json:33-35,48). - Add SoT/.omp/plugin/extensions/talk.js to Files and rebuild it after the version bump, before regenerating the payload. - class: version bump leaves a generated consumer stale
    • goal_fit - Acceptance e2e - [Inference] On the unchanged tree, cli/test/unit/ompFastMode.test.ts has no test named spawned. Vitest 5.1.2 marks nonmatches skipped and does not fail an all-skipped module. The command can exit 0 without starting the CLI it claims to prove. - Remove the redundant filtered row and use fast as the end-to-end proof, or require a reported pass for the exact spawned case rather than exit 0 alone. - class: acceptance command passes when its target test is skipped
    • research_gap - Research Tool facts, Acceptance dry, smoke, and gate - The recorded environment omits required host tools. docks-kit:1-7 needs Bash, and cli/scripts/package-smoke.ts:257-263 runs tar. On Linux, vitest.config.ts:12-31 and AGENTS.md:77 also require the review-benchmark tools and full history with origin/main. A runner with the recorded Bun and Node versions but no GnuPG fails keys.test.mjs:25-27; a shallow clone fails prepare-pin.test.mjs:373-385 regardless of the toggle fix. - Record the host tools and version sources required for the Linux acceptance commands, and state the full-history and origin/main prerequisites. - class: required acceptance tools and checkout prerequisites missing from research

    Manager response to round 1

    Repaired:

    • Round 1 goal_fit on Decisions and Steps null_tier (anchored null): Research "Anchors" fact, the Decisions choice and its rejected option (c), the Step 1 Task and Done when, and Acceptance fast. Reproduced first: a plain replacement made doc.toString() throw Unresolved alias (the anchor must be set before the alias): unset.
      • Instances: the Decisions line, the Step 1 Task, the Step 1 Done when, Acceptance fast.
    • Round 1 security_risk on the spawn pattern: Research "Spawned runs" fact, the Step 1 Task (the four agent-folder variables set empty), Acceptance e2e.
      • Instances: the spawned test in Step 1, Acceptance fast and e2e.
    • Round 1 goal_fit on Acceptance gate: Acceptance rows dry and smoke, and the Research fact on root AGENTS.md.
    • Round 1 goal_fit on the fixed version: the Decisions version choice (next patch over the landing base), the Research Replace the free-model wrapper with top-level fast tier flags #283 note, the Step 1 Task, Acceptance gen.
    • Round 1 research_gap on Node: the Tool facts line for Node.js v26.13.0 with the shebang evidence.

    Rejected: none.

  5. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 3, delta

    Plan-review: repair

    • goal_fit - Goal, Research “Anchors” and Decisions, Steps null_tier, Acceptance fast - [Inference] The exact-node match preserves yaml 2.9.1 bindings, but it can change what OMP reads. In a config with checkpoint: { enabled: &a true }, tier: &a null, and astGrep: &a { enabled: *a } in that order, Alias.resolve finds the enclosing astGrep map, so the plan leaves *a untouched. OMP loads settings with Bun YAML, and Bun checks already-bound anchors before open collections. Removing the tier anchor therefore makes OMP read true instead of null, changing astGrep.enabled from its default false to true. - Preserve bindings as OMP reads them, and extend the repeated-anchor regression to check the effective value before and after the toggle. - class: alias rewrite assumes the writer and reader bind anchors identically
    • goal_fit - Research version bump, Steps null_tier Task and Files, Acceptance gate - [Inference] The bump changes both the deployed talk.js bytes and the deployed plugin manifest version (cli/talk/extension.ts:18,80; cli/src/engine-native/ompKitPlugin.ts:70-81). cli/test/goldens/mutation.json:26-29 records hashes for both. cli/test/lib/goldenSnapshot.ts:98-110,164-178 does not normalize their versions, and cli/test/golden-mutation.ts:374-381 compares those hashes. The generated-file check can pass while the required gate fails on stale snapshots. - Add cli/test/goldens/mutation.json to Files, refresh the affected snapshots after regenerating the payload, and run the formatting check required by the golden update workflow. - class: version bump leaves committed deployment snapshots stale
    • goal_fit - Steps null_tier Files, Research “The plan does not run OMP,” Acceptance gen and gate - The regenerated talk.js changes the version used by the extension factory’s runtime compatibility check (cli/talk/extension.ts:408-425,1443-1458). No Acceptance row loads that factory in OMP. The mutation golden compares deployed bytes (cli/test/golden-mutation.ts:153-174), and the spawned peers call TalkTransport directly (cli/test/fixtures/talk/peer.ts:23-37). Neither shows that OMP offers the tool after loading the rebuilt extension. - Use the existing isolated load smoke, bun .agents/skills/verify/scripts/omp-smoke.ts, and require exit 0 and talk tool: offered. Update the OMP tool fact accordingly. - class: changed extension has no end-to-end acceptance
    • goal_fit - Acceptance fast - [Inference] A passing run can omit the named spawned test from its report. vitest.config.ts:34-56 sets no reporter, Vitest 5.1.2 selects minimal when it detects an agent, and that reporter suppresses successful test names. Exit 0 does not provide the evidence the row requires. - Add --reporter=verbose to the existing unfiltered command and keep the requirement to see the spawned case pass. - class: acceptance reporter suppresses required evidence
    • research_gap - Research Tool facts, Acceptance dry, smoke, and gate - The checkout prerequisite is now recorded, but required executables are still missing. The launcher calls dirname and uname (docks-kit:1-20), package smoke uses GNU tar’s external gzip filter (cli/scripts/package-smoke.ts:257-263), and the gate uses sh, ps, gpgconf, and gpg-connect-agent (.agents/skills/review-benchmark/SKILL.md:818; tests/prepare-pin.test.mjs:316; tests/keys.test.mjs:399-403,528-548, both under that skill). A runner with the recorded tools but no ps fails the restore assertion independently of the toggle. The gate also invokes the pinned effect-tsgo and oxlint executables (package.json:31,45,57,60). - Record the missing executable prerequisites and their version sources, using the manifest pins for the gate’s package tools. - class: required acceptance tools and checkout prerequisites missing from research

    Previous findings:

    • Round-2 finding on Research “Anchors” and Decisions, Steps null_tier, Acceptance fast: resolved - The revised plan matches exact node identity rather than anchor name, and the recorded experiment keeps aliases of the earlier and later anchors.
    • Round-2 finding on Goal, Research “Anchors” and Decisions, Steps null_tier, Acceptance fast: resolved - The revised rewrite copies the alias’s comments, and fast requires the bound alias’s comment to survive.
    • Round-2 finding on Research version decision, Steps null_tier Task and Files, Acceptance gen, smoke, and gate: resolved - The step lists talk.js and rebuilds it before regenerating the payload.
    • Round-2 finding on Acceptance e2e: resolved - The filtered row is gone, and fast requires a named pass. Its reporter defect is separate and listed above.
    • Round-2 finding on Research Tool facts, Acceptance dry, smoke, and gate: open - repeated above.

    Manager response to round 2

    Repaired:

    • Round 2 goal_fit on "Anchors", Decisions, Steps null_tier, Acceptance fast (alias match by name): redesigned to match by node binding, alias.resolve(doc) === tier. Research "Anchors" fact (experiment alias-binding.ts with a repeated anchor name before and after tier), Decisions choice with rejected option (d), Step 1 Task (test with a repeated anchor name), Step 1 Done when (aliases of other anchors unchanged), Acceptance fast.
      • Instances: Research "Anchors", Decisions, Step 1 Task, Step 1 Done when, Acceptance fast.
    • Round 2 goal_fit on alias comments: the replacement null scalar keeps the alias's comment, commentBefore, and spaceBefore. Research "Anchors" (output autoResume: null # keep this), Decisions, Step 1 Task (commented alias), Acceptance fast.
      • Instances: Research "Anchors", Decisions, Step 1 Task, Acceptance fast.
    • Round 2 goal_fit on the stale talk bundle: Research package.json fact (talk bundle embeds the version; build-talk.ts before the payload), Step 1 Task and Files (SoT/.omp/plugin/extensions/talk.js), Acceptance gen.
      • Instances: Research, Step 1 Task, Step 1 Files, Acceptance gen.
    • Round 2 goal_fit on Acceptance e2e (filter can skip): removed the e2e row; Acceptance fast requires the report to list the spawned test as passed.
    • Round 2 research_gap on host tools: Tool facts line for Bash 5.3.0, GNU tar 1.35, GnuPG 2.4.8, Git 2.53.0, util-linux script 2.41.3, and the non-shallow checkout with the review-benchmark prerequisites.

    Rejected: none.

  6. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 4, delta

    Plan-review: repair

    • research_gap - Goal, Research “Anchors,” Decisions “Evidence,” and Request corrections - The repeated-anchor experiment shows that the parsers can disagree. It does not show that every anchored null is unsafe to replace. anchor.out itself shows a single-anchor rewrite that keeps the dependent value null. [Inference] With tier: &unused null and no alias to it, there is no binding to disturb under Bun’s alias resolver, but Step null_tier still exits 2 where the Goal promises a toggle. - Keep the conservative refusal, state the anchor-free scope in the Goal, and describe the refusal as a deliberate limit rather than a parser impossibility. - class: counterexample overgeneralized into a scope exclusion
    • goal_fit - Decisions “Failure modes” and “Pre-mortem,” Request corrections, Step null_tier, Acceptance fast - [Inference] If tier: &a null is followed by astGrep: { enabled: *a }, both suggested one-line edits leave *a unresolved. Bun rejects the alias, and OMP marks the document invalid. The planned test would lock in advice that breaks the very config that the refusal leaves intact. - Say that removing the anchor alone is safe only when nothing refers to it. Otherwise, tell users to preserve the dependent values before changing tier. Remove the one-edit promise and assert the corrected diagnostic in the existing case. - class: recovery advice leaves dependent aliases unresolved
    • research_gap - Research “Tool facts,” Acceptance talk - The new smoke command needs a bare docks-kit executable on PATH, not just Bun, OMP, and the checkout launcher. omp-smoke.ts spawns it to create and remove scratch folders (.agents/skills/verify/scripts/omp-smoke.ts:278-284,322-328), and the verify skill lists it as a prerequisite (.agents/skills/verify/SKILL.md:21). A checkout with the recorded tools but no docks-kit on PATH fails before OMP loads the plugin. - Specify which docks-kit the smoke uses, ensure it is on PATH, and record its version source. - class: required acceptance tools and checkout prerequisites missing from research

    Previous findings:

    • Round-3 finding on Goal, Research “Anchors” and Decisions, Steps null_tier, Acceptance fast: resolved - The toggle now refuses anchored nulls before writing, so it no longer rebinds aliases.
    • Round-3 finding on Research version bump, Steps null_tier Task and Files, Acceptance gate: resolved - The step lists mutation.json, regenerates it after the payload, runs formatting, and adds the golden check.
    • Round-3 finding on Steps null_tier Files, Research “The plan does not run OMP,” Acceptance gen and gate: resolved - Acceptance talk runs the isolated OMP load and requires the tool to be offered with no warnings.
    • Round-3 finding on Acceptance fast: resolved - The unfiltered command now uses --reporter=verbose and requires a named pass for the spawned case.
    • Round-3 finding on Research Tool facts, Acceptance dry, smoke, and gate: open - repeated above for the new talk row; the previously listed executables are now recorded.

    Manager response to round 3

    Repaired:

    • Round 3 goal_fit on "Anchors", Decisions, Step 1, Acceptance fast (alias rewrite assumes the writer and reader bind anchors alike): redesigned; see Redesigned. Research "Anchors", the new Decisions deliberation record, the new request correction, Step 1 Task and Done when, Acceptance fast.
      • Instances: Research "Anchors", Decisions, Request corrections, Step 1 Task, Step 1 Done when, Acceptance fast.
    • Round 3 goal_fit on the mutation golden: Step 1 Task regenerates mutation.json with bun cli/test/golden-mutation.ts --update-goldens and runs bun run format; Step 1 Files adds cli/test/goldens/mutation.json; new Acceptance golden.
    • Round 3 goal_fit on the rebuilt extension without end-to-end proof: new Acceptance talk (bun .agents/skills/verify/scripts/omp-smoke.ts, exit 0, talk tool: offered, warnings: 0); the OMP tool fact records omp/19.4.0 and the check.
    • Round 3 goal_fit on the reporter: Acceptance fast runs --reporter=verbose and requires the named cases listed as passed.
    • Round 3 research_gap on host tools: the Tool facts line adds dirname and uname (uutils coreutils 0.10.0), /bin/sh (dash), gzip 1.14, gpgconf and gpg-connect-agent 2.4.8, ps 0.2.0, and the package.json pins @effect/tsgo 0.74.1 and oxlint 1.95.0.

    Redesigned:

    • The alias finding of rounds 1 to 3. New approach: refuse a null tier that carries an anchor (node.anchor !== undefined) with exit 2, no write, and omp config.yml key 'tier' is a null value with anchor &<name>; remove the anchor or write 'tier: {}', then retry; toggle the anchor-free null forms. Rejected approaches: rewrite aliases by anchor name (round 2: a repeated name binds later aliases to another node); rewrite by YAML 2.9.1 node identity (round 3: OMP reads with Bun's YAML parser, which binds a repeated name differently); move the anchor to the new map (every alias turns into a mapping). Evidence: experiment anchored-refusal.ts (Bun.YAML.parse gave astGrep.enabled: null; YAML 2.9.1 bound *a to the enclosing map, a cyclic value). The full deliberation record is in Research, Decisions, first entry.

    Rejected: none.

  7. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Plan review round 5, delta

    Plan-review: pass

    None.

    Previous findings:

    • Round-4 finding on Goal, Research "Anchors," Decisions "Evidence," and Request corrections: resolved - The Goal limits toggling to anchor-free nulls. Research and Decisions acknowledge that some anchored forms are safe to rewrite and record refusal as a deliberate limit.
    • Round-4 finding on Decisions "Failure modes" and "Pre-mortem," Request corrections, Step null_tier, and Acceptance fast: resolved - The diagnostic tells users to replace dependent aliases with their values before changing tier. The step requires no write on refusal, and Acceptance checks the full diagnostic.
    • Round-4 finding on Research "Tool facts" and Acceptance talk: resolved - Tool facts records the global docks-kit 0.31.3 executable on PATH for scratch creation and cleanup, and distinguishes it from the checkout bundle that OMP loads.

    Manager response to round 4

    Repaired:

    • Round 4 research_gap on the overgeneralized exclusion: the Goal states the anchor-free scope and the refusal as a deliberate limit; Research "Anchors" says some anchored forms are safe to rewrite and the plan refuses all of them by choice; Decisions Choice names the limit and rejects a case analysis; the request correction says "deliberate limit".
      • Instances: Goal, Research "Anchors", Decisions Choice, Request corrections.
    • Round 4 goal_fit on the recovery advice: the message now reads omp config.yml key 'tier' is a null value with YAML anchor &<name>, which the toggle does not rewrite; if other keys use *<name>, replace each with its value first, then write 'tier: {}' and retry; no one-edit promise. Decisions Failure modes and Pre-mortem, Request corrections, Step 1 Task, Acceptance fast (full message).
      • Instances: Decisions Failure modes, Decisions Pre-mortem, Request corrections, Step 1 Task, Acceptance fast.
    • Round 4 research_gap on docks-kit on PATH for the talk smoke: the OMP tool fact names the bare docks-kit that the smoke spawns (the global Bun install, docks-kit --version 0.31.3) and that the smoke links the checkout plugin.

    Rejected: none.

  8. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Self-review

    Reviewed head d3af7119 against d3731bc9, one pass per lens of the code-review panel.

    correctness

    No findings. replaceNullTier runs before the mapping guard, changes only a null scalar without an anchor, and leaves an alias value of tier (tier: *x), a quoted 'null', a number, and a list to the existing mapping error. An empty document keeps tier unset, as before. The anchored-null error reaches the existing toggle catch, which exits 2 before the write.

    spec-and-tests

    No findings. Each new test failed on its assertion before the fix (red baseline in Verification Results). The spawned test empties the four agent-folder variables, so it cannot write outside its temporary home.

    text-and-safety

    No findings. The changelog names the three accepted forms, the refusals, and the recovery for an anchored null, and it names no machine path.

  9. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Code review round 1, lens correctness

    Code-review: pass

    Standards

    • [LOW] Bug - cli/src/engine-native/ompFastMode.ts:40-50 - Unreached: With tier: null and serviceTier: openai-only in the same deployed file, OMP migrates the legacy setting to tier.openai: priority. Inference: without a higher-priority override, --fast reports none -> priority and leaves fast mode on instead of turning it off. The CLI caller accepts deployed YAML, but the shipped config, toggle fixtures, and kit docs do not use this combination. - When the nested setting is absent, derive the prior tier from OMP's legacy OpenAI mapping without rewriting the legacy key. - class: ignored legacy setting
    • [LOW] Bug - cli/src/engine-native/ompFastMode.ts:60-71 - Unreached: tier: !<tag:yaml.org,2002:null> null becomes a null node in YAML 2.9.1 but remains the string "null" in Bun 1.4.5's verbatim-tag path. Inference: with that Bun parser, the CLI overwrites a string that it should refuse. The deployed-file caller accepts custom YAML, but the shipped config, toggle fixtures, and kit docs do not use this spelling. - Confirm that OMP's parser also sees null before replacing an explicitly tagged scalar. - class: parser disagreement on null classification
    • [LOW] Bug - cli/src/engine-native/ompFastMode.ts:49-50, cli/src/engine-native/ompFastMode.ts:88-89 - Unreached: With tier: null and an unrelated label such as modelTags.astra.name: !<tag:yaml.org,2002:int> 123, YAML 2.9.1 emits the verbatim tag as !!int. Inference: Bun 1.4.5 reads the original label as the string "123" and the rewritten label as the number 123, even though the toggle did not target it. The deployed-file caller accepts custom YAML, but the shipped labels, toggle fixtures, and kit docs do not use verbatim tags. - Replace the null tier in the original YAML text without reserializing unrelated nodes. - class: unrelated value changed by serialization

    Spec

    None.

    Code review round 1, lens spec-and-tests

    Code-review: pass

    Standards

    None.

    Spec

    • [MEDIUM] Spec - cli/test/unit/ompFastMode.test.ts:112-124 - The refusal tests only call the pure toggle. They would still pass if docks-kit omp --fast reported the wrong exit code or rewrote config.yml before reporting the error. Step 1 requires the anchored null, non-null scalar, and sequence to “exit with their error and an unchanged file” (plan-284.md:59); the fast acceptance row also requires an unchanged file (plan-284.md:65). - Use the existing fastHome and runOmp helpers for these cases. Assert exit 2, the expected diagnostic, and byte-for-byte equality with the original file. Keep the single spawned success case. - class: refusal tested below the write boundary
    • [LOW] Spec - cli/test/unit/ompFastMode.test.ts:87-110 - The round-trip cases have no comment on the tier value, and the separate comment case checks only the first toggle of tier: null. The suite would pass if tier: # note or tier: ~ # note lost its comment, or if the second toggle dropped it. Step 1 requires pure toggles of all three forms “(with a comment on the value) on and off,” and fast requires those comments to be kept (plan-284.md:59,65). - Put a value comment in each round-trip fixture and assert that it survives both toggles. - class: incomplete round-trip comment coverage

    Code review round 1, lens text-and-safety

    Code-review: pass

    Standards

    • [LOW] Security - cli/src/engine-native/ompFastMode.ts:63-66, cli/src/commands/omp.ts:255-256,272 - Running either toggle against an imported config with terminal control characters in the null tier's anchor name can alter terminal output. YAML 2.9.1 accepts those characters in anchor names, and the refusal prints the name verbatim to stderr. This requires control of the config the user toggles. - Escape control characters and line separators in both displayed copies of the anchor name. Keep ordinary names unchanged and preserve the refusal without writing the config. - class: terminal control injection in diagnostics

    Spec

    None.

  10. 15 remaining items

  11. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Code review round 8, delta

    Code-review: pass

    Previous findings

    • Round-7 finding on cli/src/engine-native/ompFastMode.ts:348-350,377-383: open - The rejection explains why a check cannot prevent a later change. It does not address the final lstat checking the old target after the live link has already changed. Repeated under Standards.
    • Round-7 finding on cli/src/engine-native/ompFastMode.ts:377-379, cli/src/commands/root.ts:130-139: open - The recheck fixes the reported EISDIR case. It still exits 1 if a replaced parent directory makes revalidation fail with ENOTDIR. Repeated under Standards.
    • Round-7 finding on cli/test/unit/ompFastMode.test.ts:336-355: fixed - The fixture sets and restores the same whole-second timestamp, and the non-BOM edit preserves byte length (cli/test/unit/ompFastMode.test.ts:335-360).
    • Round-7 finding on cli/src/engine-native/ompFastMode.ts:317,375-380: fixed - The metadata checks no longer scan bytes. The guard compares the two buffers once (cli/src/engine-native/ompFastMode.ts:308-320,375-384).

    Standards

    • [MEDIUM] Bug - cli/src/engine-native/ompFastMode.ts:349-351,384-386 - If config.yml is retargeted to a different file after the final realPath but before the final lstat, that lstat still checks the old target. Assuming the old file remains unchanged, inference: the CLI overwrites it and reports success while the active config was not toggled. - Validate the live configPath against the captured identity at the end of the guard, without dropping the resolved-target check. Keep the documented limit for changes after the final observation. - class: stale snapshot accepted for replacement
    • [LOW] Bug - cli/src/engine-native/ompFastMode.ts:338-351,375-382, cli/src/commands/root.ts:130-140 - If a symlink target’s parent directory is replaced by a regular file after the pre-read check, inference: both the second read and the follow-up resolution fail with ENOTDIR. The follow-up error escapes as PlatformError, so the CLI exits 1 even though the deployed config is no longer reachable and cli/docs/flags.md:111-117 promises exit 2 for a missing or concurrently changed config. - Classify ENOTDIR during revalidation of a known config as a refusal, while retaining exit 1 for a read failure on an unchanged path. - class: read failure bypasses change detection
    • [LOW] Maintainability - cli/src/engine-native/ompFastMode.ts:377-382, cli/test/unit/ompFastMode.test.ts:335-373,623-672 - The new failed-second-read handler has no behavior test. The directory fixture starts as a directory, and the edit and removal fixtures act during parsing, before the second read. Removing the handler would leave those tests passing while restoring exit 1 for a directory replacement between validation and read. - Use a controlled filesystem fixture to trigger the replacement at the second read and assert the refusal and no write. Also verify that an unchanged file’s read failure stays an I/O error. - class: untested error recovery

    Spec

    None.

    Manager response to round 7

    Repaired:

    • LOW, read failure bypasses change detection: a failed second read checks the identity again; a changed identity (for example a file that became a folder) refuses with ConfigChanged, an unchanged one keeps the read error; a folder at the first read still exits 1.
    • LOW, regression masked by the time check: the change tests set a whole-second time before the first read and after the save, and the non-BOM edit keeps the byte length, so only the byte comparison catches either edit.
    • LOW, redundant full-buffer comparison: sameIdentity compares the link target, type, device, inode, and time; sameBytes compares the two byte arrays once.

    Rejected:

    • MEDIUM, a retarget between the final realPath and its lstat: rejected. It is the same check-then-act class as the round-4, round-5, and round-6 rejections: each resolution and each stat of a path is a separate system call, so any finite sequence of checks leaves an interval in which a link can change before the next call. The toggle now refuses every change that completes before its last check, and the remaining intervals close only with a lock that omp also takes, which omp does not offer as a contract. The function comment records the residual.

    Redesigned: none.

  12. DocksDocks commented on Dec 1, 2026

    @DocksDocks
    OwnerAuthor

    Archived with landing pull request #291

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