Repository navigation
fix(port): worktree audit fails closed when a .env can move the omp store - #29
Merged
Merged
Conversation
…s.mjs omp config set stores any string, so a bad selector or unknown alias failed only at spawn. The script checks every selector and effort against omp models --json before writing, touches only the three pstack aliases and their agent mappings, and is idempotent.
worktree-audit-omp.patch now applies on top of upstream #805 and reuses its GNU/BSD stat and date probe instead of carrying a second one. The BSD stub in test-worktree-audit.sh serves `stat -f <format>` with %m and %N the way BSD does, since the reused probe asks for `-f '%m %N'`. Upstream merged #801, #802, #803 and #804 with the same code and tests as the carried #664, #666, #672 and #684 hunks. zzzz-check-plan-fix.patch is gone and zzz-watch-pr-fixes.patch carries #769 alone. zzzz-orch-lock-takeover.patch applies unchanged at exact offsets after #804.
Upstream #807 renumbered swarm's Phase A, so the model-step rule now takes any step number and keeps it, and the Phase B rule matches any step number. ketchup-video joins the `/skill:<name>` alternation. The description rule is one `Use for /<name>` pattern instead of a per-name list that had already missed ketchup, sharpen and correct. The `run_in_background: true` exemption matched three sentence rules as a substring and hid the Phase B rule going stale. It now names the token rule it was written for, and the retired figure-it-out exemption is gone.
Moves the pin from 4ec7ffa across 13 upstream pstack commits: the ketchup-video skill, the statechart Pele renderer, the /statechart read step in generated verify skills, the reflect plugin-cache rule, the swarm renumbering, and the merged watch-pr, check-plan and orch fixes the port used to carry as patches. The READMEs count 60 skills.
PORTING.md named three carried-PR patches that no longer exist in that form. It now names all five patches and what each carries, and records that a merged equivalent can re-apply at an offset instead of failing.
… (fails until the fix) Four scenarios put a store key in each .env file omp reads and a recent chat in the moved store. The build at this commit buckets the merged worktree safe in all four. Also asserts unpushed work holds under an unreadable store, and adds an optional live probe that asks a real omp, under the fixture HOME and with no model turn, where it would write a transcript.
…tore omp fills unset variables from the launch cwd .env, the agent dir .env, the config root .env and ~/.env, and reads OMP_ keys there as PI_. A store key in any of them moved the store past the audit, which then read the default store, found no chat, and bucketed a merged worktree safe. The audit now greps each of those files, every worktree root included, for a store key and holds the rows at verify-recent-chat with LAST_CHAT ?, naming the file on stderr. It does not replay the loader.
… store Probed on omp 18.12.6 in a throwaway HOME through rpc get_state.sessionFile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
worktree-audit.shfinds omp's session store from the process environment only. omp also fills unset variables from.envfiles, so a store key set only there moves the store. The audit then read the default store, showedLAST_CHAT -, and put a merged worktree with a recent omp chat insafe, which the cleanup playbook offers for deletion.What changed
.envfiles omp reads (the agent dir, the config root,~/.env, and each worktree's own) for the seven keys that move the store. A match sets the existing failed-lookup state, names the file on stderr, and the row holds atverify-recent-chat. It does not reimplement omp's.envloader.test-worktree-audit.shgains four scenarios, one per file, plus a control that leaves unrelated and commented-out keys alone. It also asserts that unpushed work still bucketshold-unpushedwhen the store is missing.sessionFileand checks the audit's bucket directory matches. It prints SKIPPED when omp is absent and never calls a model.session-store-on-omp.mdrecords which.envfiles and keys omp reads, as verified.Scope
KEY=still triggers the hold, although omp ignores it. Holding errs the safe way.--session-dirand--profileflags are still invisible to the audit.Blast Radius
It touches only
/skill:poteto-mode's worktree audit. The change can hold more rows than before and never fewer.Verification
worktree audit: FAIL (8), four rowswant 'verify-recent-chat', got 'safe'. With the fix,worktree audit: PASS.LAST_CHAT: want '2026-10-25', got '-'.check-port.shprintscheck-port: PASS, andtest-gate-mutations.shpasses.