Repository navigation
Conversation
…s safely (#228) Replaces `pgrep -fl "mxcli exec" | grep -qv $$` (substring match on every process, no log row, absent under Git Bash) with mxtk_proc_list + mxtk_raw_exec_on in _common.sh: argv0 is mxcli, `exec` is an argument, args name this model, own ancestry/descendants excluded by exact pid. A hit logs a BUILD-LOG row and refuses (FORCE_EXEC=1 overrides); no process list -> warn and continue. MXTK_NO_RAW_GUARD=1 opts out. Windows branch (PowerShell CIM) is unexercised here: no Windows host, no golden capture committed; the fixture asserts parsing on the host's real ps output instead. Checked: bash -n, check-portability, check-scripts, leak guard clean; test-exec-raw-guard.sh 10/10 (against the pre-fix exec.sh 4 cases fail). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…WED_MAX unseen (#232) Supersedes #188 (its shipped parts are #193/#191). look-ledger.sh gains `unseen` (OWED rows not cleared by a PROOF-OF-LOOK report citation or a `Waived obligation look/...` register line) and `creates` (CREATE-only page list). exec.sh step 4b refuses (exit 3, BUILD-LOG row) a script that CREATEs pages while unseen > LOOK_OWED_MAX (default 5, 0 = off). ALTER-only scripts and --patch pass; a `-- PROOF-OF-LOOK` line in the first 30 script lines, FORCE_EXEC=1 and MXTK_NO_LOOK_GUARD=1 lift it; no Read hook in .claude/settings*.json -> warn once, continue. gate-check.sh Stage 5 keeps its own inline join (not refactored here); build-plan-status/fidelity-floor residuals untouched. No field run yet: fixture only (the pre-fix exec.sh fails the refusal cases). Checked: bash -n, check-portability, check-scripts, leak guard clean; test-exec-look-guard.sh 17/17; test-exec-raw-guard.sh 10/10; test-look-ledger.sh result above. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
5 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.
What changed and why
Draft until one field run on a laptop (instrument rule 4). Two commits, two guards in
project-bin/exec.sh.#228 raw-exec guard (
project-bin/_common.shgainsmxtk_proc_listandmxtk_raw_exec_on). A process counts only when argv0 ismxcli/mxcli.exe,execis an argument, and the args name this model's path or file name. The exec.sh shell's own ancestors and descendants are excluded by pid from one process snapshot (the$(...)subshells running the check used to show up under the caller's argv and made the guard refuse itself). A confirmed raw exec on the same model refuses with exit 1 and a BUILD-LOG row;FORCE_EXEC=1overrides;MXTK_NO_RAW_GUARD=1opts out. When no process list is available it warns and continues. Fixturetests/wave2/test-exec-raw-guard.sh10/10, fails 4 against the pre-fix exec.sh.#232 LOOK-debt guard (supersedes #188).
project-bin/look-ledger.shgainsunseenandcreates. exec.sh step 4b refuses a script that CREATEs pages (exit 3, BUILD-LOG row) when more thanLOOK_OWED_MAX(default 5, 0 = off) built pages are unseen. These pass: ALTER-only scripts,--patch, a-- PROOF-OF-LOOKline in the first 30 script lines, aWaived obligation look/<Module or Module.Page>register line or a PROOF-OF-LOOK citation in a ui-review report,FORCE_EXEC=1,MXTK_NO_LOOK_GUARD=1. With no look-ledger Read hook in.claude/settings*.jsonit warns once and steps aside. Fixturetests/wave2/test-exec-look-guard.sh17/17, fails 4 against the pre-fix exec.sh; existingtest-look-ledger.sh11/0.Not in this PR: gate-check.sh Stage 5 still computes its own inline unseen count (size cap); the #232 residuals (fidelity mean/floor gate, content-aware Stage 6, owed count in build-plan-status, stub-overwrite guard, breadcrumb skill edits) stay open.
Field evidence
None yet. Fixtures only. The Windows process probe (PowerShell
Get-CimInstance) is unexercised; the Linux fixture parses this host's realpsoutput rather than a committed golden capture.Checklist
--patchpass; env opt-outs); both layouts via_common.shroots; Windows branch guarded but unrun🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code