-
Notifications
You must be signed in to change notification settings - Fork 6
release(0.2.13): attest contract, interview readiness, and the devops/flaky policy rules #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7424598
devlog: the win32 recipe was executed, not assumed
lidge-jun 472beb3
devlog: the attest from/to cascade, and the lessons opencodex paid for
lidge-jun 49d90e6
fix(attest): tell agents the shape the gate actually requires
lidge-jun c19e578
fix(attest): close four review blockers on the shape hint and its nei…
lidge-jun db12971
fix(cli,docs): finish the attest-contract surfaces and pin them again…
lidge-jun 3d5d0d3
docs(dev-devops): the freeze-gate rules opencodex paid for
lidge-jun 6cf7b69
docs(testing): make the flaky policy elimination-first, with one owner
lidge-jun 836954d
docs(dev-devops): correct three invented claims the audit caught
lidge-jun 3ae3847
devlog: record what the wp2 audit disproved
lidge-jun 6268501
docs(testing): close the severity hole the flaky-policy audit found
lidge-jun f0e6442
devlog: record what the wp3 audit changed
lidge-jun 438ddd3
devlog: untrack two plan units that were never mine to commit
lidge-jun 7f2dd5e
devlog: closeout for the attest from/to and devops-lessons unit
lidge-jun 260e2b4
devlog: re-run the falsification checks against the final tree
lidge-jun 7991fd7
devlog: untrack the user plan units again, and say why it recurred
lidge-jun c84d105
devlog: record that the scope violation recurred
lidge-jun 964669d
fix(interview): make readiness reachable by interviewing, not by asse…
lidge-jun 677a85f
release(0.2.13): bump every version surface for the attest, interview…
lidge-jun cd342bf
release(0.2.13): sync the test badge and stop the skill teaching the …
lidge-jun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
39 changes: 39 additions & 0 deletions
39
devlog/_plan/260822_attest_win_parity/040_recipe_verified.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # 040 - the win32 recipe, executed rather than assumed | ||
|
|
||
| The attest fix tells Windows users to do this: | ||
|
|
||
| ```powershell | ||
| '<json>' | Set-Content -Encoding utf8 .codexclaw/attest.json | ||
| cxc orchestrate <phase> --session <id> --attest-file .codexclaw/attest.json | ||
| ``` | ||
|
|
||
| That recommendation was executed before it was written down, because the | ||
| archive already contains a case where the obvious encoding advice is wrong | ||
| (`fuck-powershell#7`: `Out-File -Encoding utf8` writes a BOM on 5.1, and | ||
| `utf8NoBOM` does not exist there at all). | ||
|
|
||
| ## Measured | ||
|
|
||
| ``` | ||
| bytes=48 head=efbbbf7b2266726f bom=UTF-8 BOM | ||
| utf8 matches=1 | ||
| ``` | ||
|
|
||
| So `Set-Content -Encoding utf8` does prepend a BOM here too. The recipe is still | ||
| safe, because `orchestrate-cli.test.ts` already carries an explicit case: | ||
|
|
||
| > `#31: --attest-file tolerates a UTF-8 BOM (PowerShell 5.1 Set-Content -Encoding utf8)` | ||
|
|
||
| The CLI accepted the file; the only refusal was the phase gate (`IDLE -> D`), | ||
| which is correct. | ||
|
|
||
| ## Why this is worth a page | ||
|
|
||
| Two of the three recommendations in the wider archive turned out to be wrong on | ||
| this host. A workaround that has not been run on the platform it targets is a | ||
| guess, and shipping a guess inside an error message is worse than shipping no | ||
| message — the agent trusts it and loses a turn. | ||
|
|
||
| The recipe is now exercised continuously rather than tested once: every attest in | ||
| this loop since the fix has gone through `--attest-file`, including the ones | ||
| closing these cycles. |
146 changes: 146 additions & 0 deletions
146
devlog/_plan/260825_attest_fromto_and_devops_lessons/000_baseline_and_scope.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| # 000 — baseline and scope: the attest from/to cascade, and the lessons opencodex paid for | ||
|
|
||
| Two things share one unit because they share one failure shape: **a gate that | ||
| rejects work the documentation told the agent to do.** | ||
|
|
||
| The attest half is the shipped CLI refusing an attestation whose shape the skill | ||
| never described. The devops half is opencodex's v2.32.1 freeze train discovering, | ||
| repeatedly, that a gate nobody can satisfy honestly gets satisfied dishonestly — | ||
| a red suite argued into an exception, a flaky test re-run until green, a | ||
| readiness report describing a tree that had already moved. | ||
|
|
||
| The flaky-test policy sits between them. It is currently the clearest instance | ||
| in this repo of a rule that contradicts itself in the same file. | ||
|
|
||
| ## Baseline | ||
|
|
||
| Repo: `/Users/jun/Developer/new/700_projects/codexclaw` at `74245989` | ||
| (`devlog: the win32 recipe was executed, not assumed`), version 0.2.12. | ||
|
|
||
| Pre-existing dirty state, NOT created by this unit and to be preserved: | ||
|
|
||
| ``` | ||
| M scripts/dev-symlink.sh | ||
| ?? devlog/_plan/260722_260722-repo-governance-config/ | ||
| ?? devlog/_plan/260814_260814-fix-main-ci-windows-worktree/ | ||
| ?? mktemp: | ||
| ``` | ||
|
|
||
| Test baseline before any edit, full declared command: | ||
|
|
||
| ``` | ||
| npm test | ||
| -> tests 1961 pass 1961 fail 0 duration_ms 36311.187 exit 0 | ||
| ``` | ||
|
|
||
| The pabcd-state slice alone, run twice by the error-hunt lane: | ||
| 865 pass / 0 fail both times, exit 0, 6.24s then 9.54s. Same 865 test names. | ||
| **No flaky test was observed in this repo's own suite.** That matters for scope: | ||
| the flaky work here is policy text, not a test repair. | ||
|
|
||
| ## The defect, stated exactly | ||
|
|
||
| `coerceAttest` returns null unless `from` and `to` are strings | ||
| (`components/pabcd-state/src/attest.ts:91-96`). The CLI turns that null into: | ||
|
|
||
| ``` | ||
| attest JSON missing valid from/to | ||
| ``` | ||
|
|
||
| at `orchestrate-cli.ts:227` (inline) plus `orchestrate-grammar.ts:88` for the | ||
| chat surface. The `--attest-file` path at `:257` emits a DIFFERENT string, | ||
| `attest file <path> is missing valid from/to` — same defect, separate wording, | ||
| and therefore separate test coverage (see 002 blocker 2). | ||
|
|
||
| The contract agents actually read — the "Required attest keys" table at | ||
| `skills/pabcd/SKILL.md:91-98` — lists `did`, `auditOutput`, `auditVerdict`, | ||
| `auditResidual`, `checkOutput`, `exitCode`. It never names `from` or `to`. | ||
| An agent that copies the table writes `{"did":"..."}` and is refused before any | ||
| other check runs. | ||
|
|
||
| This is not theoretical and it is not rare: | ||
|
|
||
| ``` | ||
| cxc chat search "missing valid from/to" --days 0 | ||
| -> 50 hits (3/9457 files scanned) | ||
| ``` | ||
|
|
||
| across opencodex, ima2-gen, cli-jaw and codexclaw sessions, the oldest sampled | ||
| at 2026-08-13. Every one of those is a wasted turn inside somebody's loop. | ||
|
|
||
| ### It is a cascade, not a single error | ||
|
|
||
| The from/to refusal is only the first gate. Fixing it alone walks the agent into | ||
| the next two, because `planUnit`, `workPhaseId` and `testReceiptPath` are ALSO | ||
| absent from every skill doc (`rg` over pabcd/loop/interview returns zero hits for | ||
| all three) while the runtime requires them: | ||
|
|
||
| | # | Refusal | Source | | ||
| |---|---------|--------| | ||
| | 1 | `attest JSON missing valid from/to` | `orchestrate-cli.ts:227` (parse time, before session/plan/binding) | | ||
| | 2 | `P -> A requires "planUnit"` | `plan-gate.ts:38-43` | | ||
| | 3 | `A goalplan is bound ... pass "workPhaseId"` | `attest.ts:148` | | ||
| | 4 | `C -> D on a goalplan-bound session requires "testReceiptPath"` | `check-gate.ts:37` | | ||
|
|
||
| A bound HOTL session on P>A therefore needs FIVE keys the skill names ONE of. | ||
| Documenting only `from`/`to` would trade one round trip for two. | ||
|
|
||
| ### Why 260822 did not already fix this | ||
|
|
||
| `devlog/_plan/260822_attest_win_parity/` fixed a different failure with a | ||
| similar surface: on Windows, PowerShell mangles inline `--attest '{...}'` so the | ||
| CLI sees invalid JSON. That unit made the recipes platform-aware and pushed | ||
| `--attest-file`. It never touched the key list, because the key list was not the | ||
| bug it was chasing. The from/to omission survived that sweep intact. | ||
|
|
||
| ## Scope | ||
|
|
||
| IN: | ||
|
|
||
| - `skills/pabcd/SKILL.md` attest table and the copy-paste examples under it | ||
| - `skills/interview/SKILL.md:64,144` (two override examples missing from/to) | ||
| - `skills/loop/SKILL.md` attest references | ||
| - `structure/20_pabcd_dispatch_doctrine.md:72` (names the keys as invalid JSON) | ||
| - `components/pabcd-state/src/orchestrate-cli.ts` + `orchestrate-grammar.ts` | ||
| null-coerce error text, and `hook.ts` injected examples | ||
| - `components/pabcd-state/test/` regression coverage | ||
| - `skills/dev-devops/SKILL.md` + `references/ci-cd-deploy.md`, | ||
| `references/sre-foundations.md` (new DEVOPS-* rules) | ||
| - `skills/dev-testing/SKILL.md` §5.4 + `references/ci-pipeline.md` §5, | ||
| `skills/dev-debugging/SKILL.md` Scenario D + anti-pattern row, | ||
| `skills/dev/references/skill-ownership.md` (missing flaky row) | ||
| - this devlog unit | ||
|
|
||
| OUT: | ||
|
|
||
| - `~/.codex/plugins/cache/codexclaw/**` — the installed payload. The repo is the | ||
| source of truth; a rebuild may be RUN, no cache file is authored. | ||
| - the opencodex repo. It is read-only evidence this cycle: no branch, no PR, no | ||
| commit there. | ||
| - `git push`, PRs, npm publish, version bumps. Local commits only (LOOP-GIT-01). | ||
| - repairing the interview-readiness dead end found by the error-hunt lane (001 | ||
| §F.1). It is a design decision about what `isInterviewReady` should accept, | ||
| not a text fix, and it gets its own unit. | ||
| - the docs-site quickstart and guide attest examples. They are a live | ||
| copy-paste surface and they are incomplete, but docs-site is its own build | ||
| with its own review; recorded as a follow-up (002 nit 4). | ||
|
|
||
| **Amended after audit (002 blocker 3):** `cxc freeze --help` was originally | ||
| listed OUT here while 010 §7 listed it IN. It is now **IN**. It is a workspace | ||
| mutation behind a read-only-looking flag that exits 0, so nothing signals it, | ||
| and the guard belongs in the same file family wp1 already opens. | ||
|
|
||
| ## Accept criteria | ||
|
|
||
| | # | Criterion | Proof | | ||
| |---|-----------|-------| | ||
| | 1 | The attest table names every key the runtime requires per edge, with a copy-paste object | diff + `rg` for `workPhaseId` in `skills/pabcd` returning hits | | ||
| | 2 | The null-coerce refusal prints a correct example for the requested edge | actual CLI output of a failing invocation | | ||
| | 3 | A regression test pins that message | test name + green run | | ||
| | 4 | dev-devops carries the freeze-train lessons as named rules with devlog citations | `rg` for the new rule ids | | ||
| | 5 | Flaky guidance is elimination-first with one canonical owner and no surviving contradiction | `rg -i -e flaky -e quarantine` across the four skills | | ||
| | 6 | `npm test` green at the final tree | `cxc receipt test` path, exit 0 | | ||
|
|
||
| ## Terminal outcome expected | ||
|
|
||
| DONE. `NOOP` is unavailable: the divergence is measured above, not hypothesized. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new top-level help advertises
cxc scan show, but the repository-wide command search finds no show handler andparseScanCliArgsaccepts onlyrecordplus help aliases. Users following this entry therefore receiveunknown scan action 'show'; either implement the read-only verb or list only the supportedrecordcommand.Useful? React with 👍 / 👎.