Skip to content

v0.2.36.0 fix: the test run's contracts, refusals, save and store, and causes without private paths (Cycle 0050, PR-1 of 3) - #119

Merged
ryota-murakami merged 80 commits into
mainfrom
codex/cycle-0050-pr1-run-contracts-and-tests
Oct 23, 2026
Merged

ryota-murakami merged 80 commits into
mainfrom
codex/cycle-0050-pr1-run-contracts-and-tests

Conversation

@ryota-murakami

@ryota-murakami ryota-murakami commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
{
  "schema_version": 1,
  "pr": 119,
  "head": "94aba4c00c7fafc0e857d8d8e6b726c0dd08813e",
  "version": "0.2.36.0",
  "base": "main",
  "gate": {
    "tests": {
      "pass": 5858,
      "fail": 0,
      "skip": 6
    },
    "package": {
      "pass": 1061,
      "fail": 0,
      "skip": 10
    }
  },
  "session_kind": "interactive",
  "pregate": "pass @77da59a7d84d (6 checks, current for 94aba4c00c7f)",
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  }
}

Refs #118 (Cycle 0050, bug-fix cycle, PR-1 of 3). This pull request closes the 155 PR-1 tasks of #118. PR-2 and PR-3 close the rest, and #118 stays open until PR-3 merges.

/ship did not converge (converged:false). Three fixing cycles ran, and the third review round still had findings. Under the owner's ship review limit (AGENTS.md, 2026-10-23; #118 D49), every finding of that last round is fixed or closed with evidence in 763bf0e (F261 to F275), Minor ones included. Each fix has a re-executed mutation proof. No Critical or Major defect is open, so no Issue records any. No fourth cycle ran.

Review binding. The three review rounds reviewed tree 5358610 (1350981). After it, the final tree adds four things, none reviewed by a fourth round:

  • the third cycle's fixes (763bf0e);
  • the README sentences of the documentation audit (0ddd458);
  • a test stand-in the gate found stale (d10f77d, F277);
  • the release commit (94aba4c, with EXTENSION_VERSION, F278).

They are checked by their own mutation proofs and by the verification gate on the final tree below.

Summary

This pull request fixes bugs from two sources: Cycle 0049's carried list (F3 to F213), and the defects that this cycle's own reviews and gate found (F210 to F278). They are in the test run, its MCP contracts and refusals, save and store, redaction, the bundled skill, the compaction hook and the test scripts.

Test run and its MCP contracts

  • Full library. A full saved-study library makes codebook_status read node-test not ready, with the count and the limit. A start becomes a typed PREREQUISITE_MISSING, worded as the library's refusal: the learner frees a place, never the agent (F92, F93).
  • Early checks and stops. The dirty-editor and Vitest program checks refuse during preparation, before the history begins (F57). A stop before the history or the first stop reads stopped, not refused. It keeps an admission refusal and frees its slot (F55, F56, F97, F222).
  • Failed release. After a stop whose release failed, the run offers only stop, and a continue is refused with STALE_PAUSE (F91). A late continuation keeps a failed phase (F77).
  • Stop positions. A declared stop that the debugger binds at another column of its line is accepted and captured there, and the declared column is tried first (F155's first half, F220). The citation-position refusal names the stop, its anchor, the cited range and the failed condition (F205, F242).
  • Resilience. A transient seal failure is retried once after 200 ms (F100). The diagnostics sink cannot throw after deactivation (F99). An earlier session's replay is refused at once (F9).
  • Capture gaps. nodeTest.captureMissing is exposed and read again at the next learning-material save. The skill claims saved learning only when it is empty (F72, F252).

Save, store and Saved studies

  • Reading a recording. The history store scans a growing recording by its appended bytes, one summary at a time per history, and starts the scan over on a replaced journal (F64, F216, F244). Transient read errors are not remembered, and a transient header failure keeps the listed history (F63, F217). The memo watches header.json (F102).
  • Empty histories. A history sealed with no entry is removed when it seals, or when a read finds one that an earlier version sealed. It takes no place of the limit (F85, F213, F266). Only a seal that records nothing makes a history empty: a history whose journal was lost, or that holds learning material or understanding marks, is kept (F251, F274). A removed empty history offers no read-history (F253).
  • Save. Save before the first stop does nothing. Save on a run that ended before its first stop says the run recorded nothing. A Save receipt follows the store's revision (F89, F221, F52, F225). The status item follows the run and redraws only on change (F83, F90).
  • Replay debugger. When a first open's replay debugger cannot start, the replay stays open and the debugger's row reports it. Retry restarts the debugger, and an overtaken start commits nothing. A debugger the learner stopped stays stopped (F98, F226, F237, F275).

Private paths in causes

  • What is hidden. Every MCP answer sanitizes its cause, StudyErrors included. The storage folder, the workspace and the home folder read <storage>, <workspace> and ~, also under their real paths (F243, F261, F58, F214).
  • Where. Status, action, continue, receipts, write failures, release failures, terminal reasons, the save notice and the book catalog do the same (F10, F15, F48, F49, F218, F219, F233, F256, F257, F264).
  • Long causes. A long cause is cut between characters after the roots are hidden and ends with … [cut] (F51, F258, F263, F265).

Skill, hook, scripts and documents

  • Skill 1.0.47: a Local chat session for a Copilot-harness chat, token pins and a separate version pin (F86, F94).
  • Compaction hook: it tolerates CRLF and trailing spaces, prints the owner's rule when a section is missing, and prints its sections verbatim (F74, F84, F268).
  • Scripts and documents: test:shard --record names failed tests, in the singular for one (F60, F212). The README gains the Output › Codebook how-to and recovery rows (F103, F228). AGENTS.md states the owner's ship review limit (F229, F230, F238, F241).

Load-dependent test failures (closure rule 3)

  • F4, F5, F6, F82, F112, F113, F135, F154, F210, F215, F231 and F232 are fixed at their cause: tests wait on observable results, and the act is bounded instead of the whole test.
  • Each named test passed 20 of 20 file runs beside four background full suites. The logs are kept privately, and Cycle 0050: every defect Cycle 0049 carried is fixed or closed with evidence #118 records the counts and load averages.

Tests only

  • State-machine cells, coverage gaps and value cards (F16 to F38, F53, F68 to F70, F75, F76, F80, F81, F87, F88, F244, F245, F254, F255, F272, F273, F277).

Test Coverage

Step 7 coverage audit (first cycle). 30 paths, 28 covered, 93% value-weighted, 0 gaps. Two existing tests were extended: configuredService.test.ts and ownedNodeTestRun.test.ts.

Later cycles. Their audits added tests for every reported gap:

  • cycle 2 (f7c6573): every MCP answer path, and a broken journal line's reason;
  • cycle 3 (F273): an oversized seal, a seal whose read fails, a material save before the seal, a capture-gap re-read that still fails, a failed seal keeping read-history, and an absent profile.

Closure proof. #118 records every task's closure:

  • a behavior defect closes by a red run against the unfixed code;
  • a test gap closes by a mutation proof.

The driving agent re-executed every red run and every mutation proof.

Tests ran: tests count unavailable (the receipt has no count; the runner's summary reads 5,864 tests, 5,858 pass, 0 fail, 6 skipped or todo)
Tests ran: package count unavailable (the receipt has no count; the runner's summary reads 1,071 tests, 1,061 pass, 0 fail)

Pre-Landing Review

Three fixing cycles:

  • Cycle 1 (Step 9 pass 1): 1 Critical, F243 (a private path in an MCP answer's cause), plus findings in testing, security, maintainability, performance and simplification. All are fixed in a96ada1 except two: F246 closed with evidence (0.61 µs per call), and F248 moved to PR-3 (D47).
  • Cycle 2 (Step 9 pass 2 with Step 11: Claude adversarial, Codex adversarial and the Codex structured review): 1 Critical and P1, F251 (data loss), and F252 to F258, all fixed in 0d336e5. Nine findings closed with evidence (F259). F260 moved to PR-2 (D48).
  • Cycle 3 (Step 9 pass 3 with Step 11 pass 3): F261 to F275, all fixed or closed with evidence in 763bf0e.

The verification gate on the final tree then found F277 and F278. Both are fixed with proof (D51).

Other reviews:

  • Local CodeRabbit CLI: three rounds; their findings were fixed as F225 to F230 and F237 to F242.
  • open-code-review-delegate: F216 to F224.
  • Hosted CodeRabbit: not run before this pull request opened.

Gate edits: none detected (Step 7 gate rescan: 277 listed, 178 eligible, the tool read 50; the parent read all 15 tagged hunks and checked all 178 for lost assertions: 0 findings)

Exploratory QA

Compaction hook: 2 of 2 charters pass (a CRLF checkout, a renamed section). This pull request owns no native-check row of #118's table. Unit tests and the five Reader DOM checks cover its UI-facing changes (status item, Study pane lines); no native editor run does.

Design Review

No visual or layout change: the Study pane and status item change only their text and state, so design review was skipped.

Eval Results

The bundled skill changed (1.0.47), but this repository has no eval suite. The skill's routing and token tests pin it.

Scope Drift

Scope Check: CLEAN (every changed file maps to a PR-1 task of #118).

Plan Completion

The plan is #118's PR-1 task list: 155 of 155 DONE. An open bug-fix task would count NOT DONE. Five tasks belong to later pull requests of this cycle and stay in it:

  • PR-3: F155's second half and F248 (D45, D47);
  • PR-2: F249, F250, F260 and F276 (D48, D50).

Linked Spec

Linked to #118 (partial delivery: PR-1 of 3; not auto-closing). The remaining work:

  • PR-2: the Application pane and the Study section;
  • PR-3: the recorded-source slot, transitions, open and arrangement, Cursor placement, and the browser replay's dark frames.

Spec archive 20261023-031910-11275-cycle-0050-every-defect-cycle-0049-carried-is-fixed-or-close.md.

Verification Results

  • AC3, the gate commands on the final tree: 16 of 16 PASS (see Test plan).
  • AC5: PR-1 owns no native check.
  • AC6 (nothing carried): belongs to the cycle's close after PR-3.

TODOS

No TODOS.md: the cycle rule keeps every defect as a task in #118 (AGENTS.md).

Documentation

Audit binding (D51). The audit (c50-pr1-docs-140131-r2, the second and last attempt) binds the documentation as committed. After it, the gate's fixes changed two release paths that no document describes:

  • extension/src/constants.ts, the version constant;
  • extension/src/tests/extension.test.ts, a test stand-in.

Under the owner's direction in AGENTS.md, the audit stays valid for the documentation; no hash was refreshed. A CHANGELOG wording observation from the audit is PR-2's F276 (D50).

Status: updated. One factual correction was made in extension/README.md; no blockers.

Scope: the base-to-working-tree diff, including the unstaged CHANGELOG.md, VERSION, extension/README.md, extension/package.json and the package test version line. Every user-visible behavior named by the ## [0.2.36.0] entry was checked against extension/README.md and against extension/src: the full-library status and refusal, pre-history checks, stops bound at another column, stopped-before-first-stop, read-history offers, STALE_PAUSE after a failed release, the one-time seal retry after 200 ms, removal of empty histories and the kept damaged ones, Save before the first stop, captureMissing, the replay debugger that cannot start, PLAYBACK_PROFILE_UNSUPPORTED, <storage>/<workspace>/~ causes, the 300-character cut and the bundled skill 1.0.47 Local chat advice. The first-attempt and parent README edits in the Test replays section match the code.

Documentation health:

  • extension/README.md: Updated. The … [cut] sentence in the Output > Codebook paragraph now says the cut applies to tooltips, notifications, the run resource and MCP messages (at most 300 characters in the run resource) and that the Output entry keeps the whole cause, as the code does.
  • CHANGELOG.md: Current (not edited by this audit). One wording observation is recorded as a decision.
  • AGENTS.md, PRODUCT_GOAL.md, root README.md: Current, unchanged by this release's uncommitted edits; PRODUCT_GOAL.md and the PNG were not edited.

Coverage debt: none new; every CHANGELOG behavior has a README reference sentence. No diagram drift (no architecture diagrams touched).

Test plan

All on the final tree 94aba4c (tree 77da59a7d84d), from extension/:

  • pnpm format:check, pnpm typecheck, pnpm lint, pnpm health:static, pnpm dupes, pnpm dead-code: each exit 0
  • pnpm test (gstack-evidence lane tests): exit 0; 5,864 tests, 5,858 pass, 0 fail
  • pnpm test:package (lane package): exit 0; 1,071 tests, 1,061 pass, 0 fail
  • The five Reader DOM checks (study-bootstrap, wiki-reader-dom, study-reading-pose, understanding-focus, repository-return, verify): each exit 0
  • pnpm health: exit 0
  • node --test .codex/restore-product-context.test.mjs: exit 0
  • gstack-pregate --stage preflight --allow-repo-commands: PASS (secrets clean, no stray file, no timing assertion added)
  • Required CI on the exact head

The first gate run, on b8cf9f1, failed. It found F277 (1 test) and F278 (32 package tests, one cause), and pnpm health refused to score a failed suite. Both are fixed, and the run above is the whole gate again.

🤖 Generated with Claude Code

…ths and a guarded home in causes (F11 F31 F58)
…topped and frees its slot, not a refusal (F55, F56, F97)
… outside the repository named, version-read guards tested (F34 F47 F101)
…uplicate help assertions are dropped and value cards name code in words (F13 F37 F87)
…ead-failure and preparation-wiring rows of the environment (F10 F30 F67)
…akeover waits a hang bound, not a two-second deadline (F5, F82)
…ot the whole test by the runner's 2 s (F112, F210)
…d (F210), and the slow-read tests use a 1 s send limit with 8 ms pauses (F113)
…issing; Local chat for a Copilot-harness chat; token pins and a version pin (F86 F94); name failed tests in a refused recording (F60)
…d its start a typed refusal worded as the library's (F33, F92, F93)
…appended bytes, does not remember transient read errors, watches header.json, sanitizes reasons and removes a history sealed with no entry (F14 F15 F22 F41 F45 F63 F64 F65 F85 F102)
…erged review cycles, record open Critical and Major defects in an Issue, fix the last findings and merge
… capture gaps exposed, no Save for an empty history (F44, F48, F49, F51, F71, F72)
…ollow the store revision, the status item follows the run and redraws on change, a failed open is sanitized and keeps the replay without its debugger, with the Save matrix tests (F16 F19 F23 F24 F26 F39 F40 F46 F52 F53 F66 F68 F70 F73 F75 F76 F83 F88 F89 F90 F98)
…ce summary reads, recording reasons; help interpolates the Vitest major; docstrings; README (F14 F27 F35 F41 F43 F59 F69)
…ers only stop, diagnostics sink cannot throw (F9, F91, F99)
… Stop, completed run at the deadline, unknown-run stop, no-code result row (F20, F21, F25, F32, F36)
…output so it is not removed at its seal (F85)
ryota-murakami and others added 25 commits October 23, 2026 08:39
…ond hang bound, and live entry waits for the keyboard back on the learner's draft (F231, F232)
…ettled its marker, which it does after its update ends (F5)
…dmission read and a browser run's error are sanitized (F219)
…y after the chosen position reached the disk (F231)
…iew limit's recorded defects and the bug-fix cycle that follows them (F238)
…wner is disposed reports and commits nothing (F237)
… waits for the saved stop on disk, with the reader's result bound (F231)
…he run starts, and hold the retired tab's close until it began so its wait is reached (F154, F240)
…ce range in the anchorIndex refusal (F242); docs(agents): the ship review limit's scope and the cycle rule's one exception worded (F241)
…terals the secrets scan reads as credentials
… an unexpected failure's cause (F243); a replaced journal restarts its scan (F244); transient file errors pinned (F245); pre-landing review fixes

- protocol: every tool and resource answer describes an unexpected failure through StudyService.unexpectedFailure, which sanitizes its cause with the service's roots (a removed history's lstat named the storage folder)
- the recording scan and the history read word a broken journal line through the store's describer, and the read cuts the whole reason to the index's 1,024-character bound (a long failure made the read itself fail)
- tests: a gone history through codebook_read_resource, the scan's describer, the read's bound, a journal replaced by a longer file, the transient codes
- isSealedEmptyHistory reads the error code through systemErrorCode (F247); holdsHistoryFolder documents why it stays synchronous (F246)
…only stop, and a learner's pause at the bound column is held (ship coverage audit)
…eason name no private path and keep their bound (ship coverage audit, pass 2)
… nothing (F251); capture gaps read again at the next save (F252); no read-history for a removed empty history (F253); write failures, status prerequisites and long causes name no private path and cut whole characters (F256, F257, F258); pre-landing review fixes, cycle 2

- isSealedEmptyHistory reads the seal: entryCount and journalBytes 0, beside an empty or absent journal; a damaged history (seal with entries, journal lost) is kept with its learning material (Codex structured P1)
- the next learning-material save reads the run's capture gaps again when the seal's summary read failed for a transient reason
- the run resource offers no read-history and names no historyUri for a test history sealed with no entry (D6 removes its folder)
- writeFailureError sanitizes the write's cause; codebook_status sanitizes every missing prerequisite sentence; sanitizedCause cuts between characters with the cut marker
- tests: the failed removal at the seal and in dropSealedEmpty, a summary after a recording's or a sealed history's folder is gone (F254, F255); the recording scan documents that it trusts its own append-only writer
- NODE_TEST_HISTORY_SEAL_LIMIT_BYTES names the seal bound
…a literal the secrets scan reads as a credential
…earner files keep an empty history (F274); an output moment waits for a retiring replay debugger (F275); causes cut after their roots are hidden, by whole characters; pre-landing review fixes, cycle 3

- StudyService.unexpectedFailure sanitizes a StudyError's message and cause (a stored book, a reveal's stale pause, a playback refusal quoted raw paths)
- a history holding learning material or understanding marks is never removed as empty, at the seal or by the count (Codex adversarial High)
- a moment without a recorded stop waits for a replay debugger still being disposed, and leaves one the learner stopped stopped (Codex structured P2)
- causeRootsFor builds every set of cause roots, and each real path is resolved once (F262); sanitizeCause hides roots before joining and cutting (F263); the save notice and the book catalog's reason are sanitized (F264); store reasons are cut between characters (F265)
- the count removes a headerless sealed-empty folder (F266); replacing the store's describer forgets its memos (F267); the restore hook keeps section lines verbatim (F268)
- VITEST_PACKAGE_PATH and VITEST_PROGRAM_PATH constants; one cited sentence (F270); simplifications (F271)
- tests for the state-machine and coverage cells of cycle 3 (F272, F273)
…emoved empty or damaged histories, STALE_PAUSE after a failed release, a stopped replay debugger stays stopped, and where a long cause is cut (0.2.36.0 documentation audit)
…nd-in describes a failure as the real workspace does, so the notice is checked through describeFailure (F277)
Co-Authored-By: Claude <noreply@anthropic.com>
@ryota-murakami

Copy link
Copy Markdown
Contributor Author

Required CI on 94aba4c: the first run of Test (10/14) failed one test (studyWorkspace.test.ts, "saved Node history is selectable in the reader without entering browser playback", 10 s wait at the reopen through a new history store). The job's rerun passed, and every check on this head is green (24 success, 1 skipped by its condition).

The failure did not reproduce in any of these runs:

  • 26 runs of the same shard command in Linux containers;
  • 4 runs of the test alone in Linux;
  • 8 runs of the test alone on the Mac at load 360.

It is tracked as F279 in #118 and is fixed in PR-2 of this cycle (D52).

Exact-head gate: the local verification gate (static checks, pnpm test, pnpm test:package, the five Reader DOM checks, pnpm health, the hook test, pre-gate Stage 1) ran on this same head 94aba4c (tree 77da59a7d84d), and required CI passed on it. Hosted CodeRabbit: not run on this pull request.

@ryota-murakami
ryota-murakami merged commit 5267030 into main Oct 23, 2026
39 of 40 checks passed
@ryota-murakami
ryota-murakami deleted the codex/cycle-0050-pr1-run-contracts-and-tests branch October 23, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant