Repository navigation
fix(o108): exec_background layer-3 protected-path snapshot on full exit - #103
Merged
Merged
Conversation
…nd exit Run the same takeProtectedPathSnapshot/diff helpers on background process close/error (full exit), not when the tool returns a job id while still running. Append 「已被修改」 notice to the buffer; fold hits into the run outcome tracker via noteBackgroundProtectedPathMods so late exits still mark incomplete / non-zero. Docs: exec_background covered; &/nohup and post-Moss-exit writes remain known limits.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
8 tasks done
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.
Summary
O108 — wire O101 Layer 3 (
takeProtectedPathSnapshotbefore/after + diff) toexec_backgroundcomplete-exit (close/error), not when the tool returns a job id while the process is still running.Known limitation from O101-grok: L3 was only on foreground
exec. After O107 (#102), this closes that gap.What changed
src/tools/background-exec.ts: snapshot before spawn; on full exit run same helpers as foreground (diff/filterExpectedGitMetadataChanges/formatProtectedPathModifiedNotice); append 「已被修改」 notice to buffer; storeprotectedPathChangeson the proc.src/core/tools/background-process-registry.ts: optionalprotectedPathChangeson proc + snapshot (paths/kind only).src/cli/run-completion.ts+run-outcome.ts:noteBackgroundProtectedPathModsharvests finished bg snaps into the tracker (dedupe by path+kind);resolveRunOutcomecalls it so late exits still → incomplete / non-zero.exec_backgroundcovered on full exit;&/nohupinside a foreground command and writes after Moss itself exits remain known limits.test/o108-exec-background-l3.spec.mjs: delayed ssh/hooks detection; benign no FP; outcome incomplete; late-exit harvest without marker in tool result; messaging; no secret leakage.No new kill-switch. Reuses O101 protected-path definitions — no duplicate list.
Attribution
exec_backgroundwas unwired.Test plan
node --test test/o108-exec-background-l3.spec.mjs→ 6/6 passnode --test test/o101-indirect-writes.spec.mjs test/background-exec.spec.mjs test/run-completion-o98.spec.mjs→ passnpm run check(format / lint / typecheck) → greenSpec
/workspace/specs/O108.md(UX/QA acceptance stubs for them to fill)Base:
048aa1f7(#102 O107 merge tip)