Skip to content

feat(status): add resumable cycle status cursors - #252

Merged
datacas merged 5 commits into
mainfrom
task-247
Oct 16, 2026
Merged

datacas merged 5 commits into
mainfrom
task-247

Conversation

@datacas

@datacas datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a persisted monotonic revision to cycle status snapshots and a reusable --cursor-file for cycle_status.py --line
  • write cursor files atomically only after emitted output is flushed; reject corrupt cursors and --since combinations
  • seed detached runs' cursor files before launch and print a reusable cursor command
  • update orchestrator guidance and workflow docs to use the cursor

Closes #247

Diagnosis

Work item: #247 — Add a resumable cursor to cycle_status.py --line. This is a feature request, so defect reproduction does not apply. The existing --since filter compares timestamps and has no persistent offset; callers must manage the cursor themselves, and equal timestamps can hide an update. The diagnosis matches the requested toolkit-owned cursor. The invariant is that a saved cursor advances only past the current snapshots emitted successfully; a monotonic persisted revision preserves ordering when timestamps tie, and the cursor is committed atomically after stdout flush. The change keeps the current-state snapshot model, so overwritten intermediate states need not be retained. Related work was searched widely: #234 is the closed tracker containing the detached-log replay symptom, and #226 remains open for repository/cycle filtering. #226 is separate; cursor handling remains applicable after filtering.

Work units

Unit Behaviour Files Tests Verification Rollback
WU-1 Resume line monitoring from a persistent revision cursor, seed detached runs, and document the workflow scripts/cycle_status.py, scripts/run_cycle.py, tests/test_cycle_status.py, tests/test_run_cycle.py, tests/test_installed_cycle.py, skills/cc-orchestrator/SKILL.md, skills/cc-orca-orchestrator/SKILL.md, docs/workflows.md Cursor resume, timestamp ties, concurrent writes, restart, missing/corrupt cursor, interrupted write, detach seeding Full suite, package validator, plugin validation, and a subprocess CLI boundary test independent; reverting this commit restores the previous timestamp-based monitor

Verification

Agent-reported evidence:

  • rtk python3 -m unittest discover -s tests -v — passed, 1,456 tests.
  • rtk python3 scripts/validate-package.py — VALID.
  • rtk claude plugin validate . — passed.
  • rtk python3 -m py_compile scripts/cycle_status.py scripts/run_cycle.py tests/test_cycle_status.py tests/test_run_cycle.py tests/test_installed_cycle.py — exit 0.
  • rtk git diff --check — exit 0.
  • CLI boundary: rtk python3 -m unittest tests.test_cycle_status.CycleStatusTests.test_cursor_resumes_across_invocations_and_identical_timestamps -v — passed; the test starts the real CLI three times with --line --cursor-file.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Implementation summary: Added the resumable status cursor requested by #247. Verification passed locally; checks for this pushed head are reported by the cycle result.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

Initial review: PR #252 (work item #247), head 251b7396c9f8c89aebc261859790be526f49c102

Status: REVIEW_PASSED_AWAITING_CI. The accumulated diff from merge base cf6cf92 to the head was fully reviewed (560 lines, SHA-256 cabfc9a7…ded75). No open finding blocks approval, but required checks are still pending, so this is not an approval. The CI gate decides.

Scope

scripts/cycle_status.py (persisted monotonic revision, a file lock, --cursor-file), scripts/run_cycle.py (detach seeds a cursor file), two orchestrator skills, docs/workflows.md, and tests. The implementation matches #247: the cursor advances only after stdout is flushed, is written atomically, a corrupt cursor errors without being overwritten, and --since combined with --cursor-file is rejected.

Findings

[REV-001] · medium · open · - · blocks:no — A corrupt .revision file silently stops all status writes

scripts/cycle_status.py:124-136, :978-993. _next_revision_locked raises OSError for an unparsable or negative .revision. CycleStatusWriter._write catches OSError and returns. Observed: after writing garbage to <status>/.revision, a further _write() left the snapshot unchanged at revision 1. Every later update is lost without any signal, so monitors see a frozen cycle. Before this change the status write had no such shared state. Suggest recovering from the visible maximum revision when the counter file is invalid, instead of dropping the write.

[REV-002] · low · open · - · blocks:no — A read-only monitor call now writes to the status directory

scripts/cycle_status.py:58-62, :1066-1070. With --cursor-file, main takes _revision_file_lock(directory). That creates the directory and .revision.lock and opens the lock file for append. Observed: --status-dir <nonexistent> creates that directory plus .revision.lock. On a read-only status directory it ends with an uncaught PermissionError traceback, where the previous read path worked. Suggest a lock-free read fallback, or a clear error, when the lock cannot be taken.

[REV-003] · low · open · - · blocks:no — A cursor ahead of the current revisions hides updates silently

scripts/cycle_status.py:1074-1086. Selection is revision > cursor with no check that the cursor is not above the highest revision. Observed: with cursor 50 and a status at revision 1, the output is empty and the exit code is 0. This happens when the status directory is recreated or the cursor file is reused with another database; the revision counter restarts, and the monitor stays silent until revisions pass the old value. Suggest treating cursor > max(counter, visible) as a reset, or reporting an error.

[REV-004] · low · open · - · blocks:no — Docs and changelog are incomplete

docs/instrumentation.md:939 still presents cycle_status.py --line --since <timestamp> as the host monitoring command, which now disagrees with docs/workflows.md and the skills. CHANGELOG.md has no [Unreleased] entry for the new --cursor-file, although earlier feature PRs (#239, #248) each added one and the release process builds notes from it.

Security triage

No security_review.always_when rule is configured, so the defaults apply. No rule matched, and my own reading found nothing sensitive. The change is local file locking and a user-supplied cursor path in a CLI. It has no authentication, authorization, network, secret, dependency, or CI-workflow surface. Not a sensitive change: the security audit was skipped after triage.

Commands run and observed results

  • python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle: 48 tests, OK.
  • python3 scripts/validate-package.py: VALID: 15 skills ….
  • Probes for REV-001, REV-002, and REV-003, exit codes and output as described above (executed, not inferred).
  • The full 1,456-test suite and claude plugin validate . were not re-run by this review; the PR reports them as passing.

Unverified

  • The Windows msvcrt locking branch was not exercised (Linux host).
  • Real multi-process contention between a running cycle and a monitor was covered only by the thread-based test the PR ships.

CI (parallel policy; read once, not awaited)

At head 251b739: Skills, manifests, and Bash installer pending (2 runs), PowerShell installer pending (2 runs). 0 passed, 0 failed, 4 pending. This is a state report, not a finding.

Residual risks

REV-001 through REV-003 are monitor-robustness edge cases outside the normal flow. They do not affect the happy path covered by the tests.

Verdict

No finding blocks approval for this head. Review complete; the CI gate waits for the checks.

@datacas

datacas commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:251b7396c9f8c89aebc261859790be526f49c102 · schema:2

Resolution summary: PR #252 (work item #247)

Status: RESOLVED. The four findings from the trusted review are resolved on head 51f04aa1806624e7d79f2a549058cab7ef558aa1. Fix-delta review used base 251b7396c9f8c89aebc261859790be526f49c102; the base is an ancestor of this head. The complete fix delta was reviewed, with no remaining P0 or P1 findings.

Findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Invalid or negative counters now recover from the highest visible snapshot revision before incrementing. Regression coverage verifies subsequent writes advance the status and repair the counter.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Cursor monitoring no longer creates a missing status directory. If it cannot acquire the revision lock, it reads atomically replaced snapshots without the lock. The fallback advances only to revisions visible in those snapshots, so it cannot skip a snapshot whose writer has advanced the counter but not yet published the file. Regression coverage exercises lock failure, a missing directory, and the counter/snapshot race.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

A cursor above the current revision ceiling now resets to the current state and emits unfinished cycles. Regression coverage verifies the stale cursor is reset and monitoring resumes.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Updated docs/instrumentation.md to describe --cursor-file and added the feature to the [Unreleased] section of CHANGELOG.md.

Verification (agent-reported)

  • rtk python3 -m unittest discover -s tests -q — exit 0; 1,460 tests passed.
  • rtk python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q — exit 0; 52 tests passed.
  • rtk python3 -m unittest tests.test_cycle_status.CycleStatusTests.test_cursor_monitor_falls_back_without_skipping_an_unpublished_revision tests.test_cycle_status.CycleStatusTests.test_cursor_ahead_of_status_revisions_resets_to_current_state tests.test_cycle_status.CycleStatusTests.test_cursor_monitor_does_not_create_a_missing_status_directory -q — exit 0; 3 boundary regression tests passed.
  • rtk python3 -m py_compile scripts/cycle_status.py tests/test_cycle_status.py && rtk git diff --check — exit 0.
  • rtk python3 scripts/validate-package.py — exit 0; VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.

Checks of pushed head

GitHub check state was read once for 51f04aa1806624e7d79f2a549058cab7ef558aa1: 0 passed, 0 failed, 4 pending (one queued and three in progress). Skills, manifests, and Bash installer has two pending runs; PowerShell installer has two pending runs. The parallel CI policy leaves these pending for the cycle CI gate.

Residual risk

The Windows msvcrt locking branch remains untested on this Linux host.

[CCT-20261016-002] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

Follow-up attempt: required check failure

Status: BLOCKED. The required PowerShell installer check failed on reviewed head 51f04aa1806624e7d79f2a549058cab7ef558aa1. GitHub job metadata identifies the failed step as Validate package with Windows Python; that step runs py -3 scripts/validate-package.py followed by the Windows unittest suite, and the later installer steps were skipped. The check annotation contains only Process completed with exit code 1. gh run view --log-failed could not retrieve the detailed log because the sandbox denied access to results-receiver.actions.githubusercontent.com. The available annotations and job metadata do not establish whether the cause is in this change, so no code was changed and the failed check is not claimed fixed. Local python3 scripts/validate-package.py passed on Linux; the Windows behavior remains unverified.

The four previously resolved findings remain as recorded above; this check failure is separate and does not change their outcomes. No fix delta was created, so there was no code delta to review or publish.

@datacas

datacas commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:251b7396c9f8c89aebc261859790be526f49c102 · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

Rereview: PR #252 (work item #247), head 51f04aa1806624e7d79f2a549058cab7ef558aa1

Status: REVIEW_PASSED_AWAITING_CI. The complete accumulated diff from merge base cf6cf92 to this head was rereviewed (704 lines, SHA-256 76bbab93…2b10). All four previous findings are resolved and no open finding blocks approval. Required checks have not all passed yet, so this is not an approval; the CI gate decides.

What changed since the previous review

Fix delta 251b739..51f04aa: scripts/cycle_status.py, tests/test_cycle_status.py, docs/instrumentation.md, CHANGELOG.md.

Previous findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

scripts/cycle_status.py _next_revision_locked. An unparsable or negative counter now falls back to the highest visible snapshot revision and the counter is rewritten. Verified by test_invalid_revision_file_recovers_from_visible_status_revision (garbage and -1).

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

_revision_file_lock(create=False) no longer creates a missing status directory, and an OSError on the lock falls back to a lock-free read bounded by visible snapshot revisions. Verified by the missing-directory and lock-failure tests, plus a probe against a mode-555 status directory (exit 0, cursor advanced, no traceback).

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

cursor > ceiling now resets to the current state and emits unfinished cycles. Verified by test_cursor_ahead_of_status_revisions_resets_to_current_state.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

docs/instrumentation.md now documents --cursor-file, and CHANGELOG.md has an [Unreleased] entry.

New findings

None.

Security triage

No security_review.always_when rule is configured; the defaults apply and nothing matched. The delta is local file locking and a cursor path in a CLI, with no authentication, authorization, network, secret, dependency, or CI-workflow surface. Not a sensitive change: the security audit was skipped after triage.

Verification (executed)

  • python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q: 52 tests, OK.
  • python3 -m unittest tests.test_cycle_status -q: 32 tests, OK.
  • python3 scripts/validate-package.py: VALID: 15 skills ….
  • python3 -m py_compile scripts/cycle_status.py: OK. git diff --check over the fix delta: exit 0.
  • CLI probes: first use seeds the cursor at the current revision; a read-only status directory still exits 0.

Unverified: the full 1,460-test suite and claude plugin validate . were not re-run (the PR reports them passing); the Windows msvcrt locking branch was not exercised on this Linux host.

CI (parallel policy; read once, not awaited)

At head 51f04aa: Skills, manifests, and Bash installer 1 passed, 1 pending; PowerShell installer 2 pending. 1 passed, 0 failed, 3 pending. This is a state report, not a finding.

Residual risk

In the lock-free fallback (taken only when the lock cannot be opened, e.g. a read-only status directory) a monitor reads the snapshot files one by one without a lock. Two concurrent writers could in theory be seen out of order and an intermediate revision skipped. Writers cannot normally run against a directory the monitor cannot lock, so this is low risk and not raised as a finding. The Windows locking branch remains untested.

Verdict

No finding blocks approval for this head. Review complete; the CI gate waits for the checks.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Windows CI failure digest for head 51f04aa (PowerShell installer job, run 38881199289). This is plain context for the next resolution pass, not a review.

Result: Ran 1460 tests, FAILED (failures=1, errors=3, skipped=68). Skills, manifests, and Bash installer passes.

  1. UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 6 is raised three times in the subprocess reader. The captured stdout is then None, which produces TypeError: argument of type 'NoneType' is not a container or iterable in:
    • test_cursor_ahead_of_status_revisions_resets_to_current_state
    • test_cursor_resumes_across_invocations_and_identical_timestamps
    • test_missing_cursor_emits_only_current_unfinished_cycles
      Cause to confirm: cycle_status.py --line output contains non-ASCII characters (status emoji) and the Windows test subprocess decodes it with the locale codec (cp1252) instead of UTF-8. Fix expectation: explicit UTF-8 on the child's stdout and on the test's subprocess decoding, without changing default output on other platforms.
  2. test_concurrent_status_writes_get_unique_monotonic_revisions fails with [1, 2, 3, 4, 5, 6, 7, 8] != [1]: on Windows only one of eight concurrent writers got a revision, so increments are not atomic or the lock is not effective there. Expected: eight unique, monotonic revisions.

The PR stays unresolved until the PowerShell installer job passes.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Resolution summary: PR #252 (work item #247)

Status: RESOLVED. All four findings remain fixed on head 51f04aa1806624e7d79f2a549058cab7ef558aa1. This attempt made no code changes because the prior fix commits are already on the PR branch. The trusted delta base 51f04aa1806624e7d79f2a549058cab7ef558aa1 is an ancestor of the current head; the fix delta is empty. The earlier full accumulated diff was confirmed at 704 lines with SHA-256 76bbab93dcce6136910c66115119dc3084385db6780c71969a217a920f9b2e10 and read in sections. The latest rereview covers that accumulated diff.

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-003] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

Findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

scripts/cycle_status.py: malformed and negative revision counters recover from visible status revisions instead of preventing future status writes. Verified by the regression test and the 52-test related suite. Fix commit: 60bf0fc9dca7ccb00ce72e485f5d7ce9b4ccf126.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Cursor monitoring does not create a missing status directory. When the revision lock cannot be acquired, it falls back to atomically replaced visible snapshots and advances only to their visible revision. Verified by the missing-directory and lock-failure regressions and a CLI probe against a mode-0555 status directory; the probe exited 0, emitted the active snapshot, advanced the external cursor, and created no lock file. Fix commit: 60bf0fc9dca7ccb00ce72e485f5d7ce9b4ccf126.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

scripts/cycle_status.py: a cursor above the current visible revision ceiling resets to current state and emits unfinished cycles. Verified by the stale-cursor regression and a real CLI boundary probe (cursor 50 reset to visible revision 3 and emitted the active snapshot). Fix commit: 51f04aa1806624e7d79f2a549058cab7ef558aa1.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

docs/instrumentation.md now documents --cursor-file, and CHANGELOG.md records the feature under [Unreleased]. Verified against the complete accumulated diff at head 51f04aa1806624e7d79f2a549058cab7ef558aa1. Fix commit: 60bf0fc9dca7ccb00ce72e485f5d7ce9b4ccf126.

Fix-delta review and security triage

The fix-delta base equals the current head, so there are no new changed lines to review. No new code-review findings were identified; the prior rereview reviewed the complete accumulated diff and found no remaining P0 or P1 findings. Security triage found no authentication, authorization, network, dependency, or privileged configuration surface and no security findings. The cursor path is explicit local CLI input and writes the requested cursor atomically.

Verification (agent-reported)

  • rtk python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q — exit 0; 52 tests passed.
  • rtk python3 scripts/validate-package.py — exit 0; VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • rtk python3 -m py_compile scripts/cycle_status.py scripts/run_cycle.py tests/test_cycle_status.py tests/test_run_cycle.py tests/test_installed_cycle.py — exit 0.
  • rtk git diff --check — exit 0.
  • CLI boundary probe using cycle_status.py --line --cursor-file <temp cursor> --status-dir <temp status> — exit 0; emitted the expected active snapshot and corrected a stale cursor from revision 50 to visible revision 3.
  • Read-only status-directory CLI probe (mode 0555) — exit 0; emitted the active snapshot, advanced the cursor outside the status directory, and created no lock file.

The Windows msvcrt locking branch remains untested on this Linux host.

Checks of pushed head

GitHub checks were read once for head 51f04aa1806624e7d79f2a549058cab7ef558aa1: 2 passed, 1 failed, 1 pending. Skills, manifests, and Bash installer passed in both reported runs; PowerShell installer failed in run 38881199289 and remains pending in run 38881194005. The parallel CI policy leaves CI failure handling to the cycle's separate CI gate; no CI fix round was run here.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-003] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

Rereview: PR #252 (work item #247), head 51f04aa1806624e7d79f2a549058cab7ef558aa1

Status: CHANGES_REQUESTED. The complete accumulated diff (merge base cf6cf92, 704 lines, SHA-256 76bbab93…2b10) was reread in full. The four earlier findings stay resolved. Rereading the Windows branch of the new lock turned up one defect that blocks approval (REV-005), and one test defect (REV-006). The Windows PowerShell installer failure on this head fits both.

What changed since the previous review

Nothing: the head is the one reviewed in CCR-20261016-002 (fix delta 251b739..51f04aa). This pass reread the Windows locking branch, which the earlier passes listed as unverified, and the new tests' subprocess handling.

Previous findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Reproduced: a .revision of garbage beside a snapshot at revision 7 gives the next revision 8. Covered by test_invalid_revision_file_recovers_from_visible_status_revision.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

A monitor probe against a nonexistent status directory leaves it uncreated (test passes). A mode-555 directory exits 0 with no traceback.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

Probe: cursor 50 against a status at revision 3 emits the snapshot and resets the cursor to 3.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

docs/instrumentation.md:939 and CHANGELOG.md [Unreleased] describe --cursor-file.

New findings

[REV-005] · high · open · - · blocks:yes — The Windows revision lock reads the byte it locks, so contending writers drop their status update

scripts/cycle_status.py:478-510 (_revision_file_lock). On nt each caller does handle.seek(0); handle.read(1) before msvcrt.locking(..., LK_LOCK, 1). msvcrt.locking is mandatory byte-range locking: while one handle holds byte 0, a read of that byte through another handle fails with PermissionError (ERROR_LOCK_VIOLATION). Every contender therefore raises before it queues for the lock. CycleStatusWriter._write catches the OSError and returns, so the update is dropped with no signal. LK_LOCK itself also raises OSError after about 10 s, which is swallowed the same way. Evidence: this is the reported Windows failure of test_concurrent_status_writes_get_unique_monotonic_revisions ([1, 2, 3, 4, 5, 6, 7, 8] != [1], one writer in eight succeeded). I could not run Windows here, so the cause is inferred from the code and that failure, not reproduced. Impact: on Windows, concurrent cycles lose status snapshots, and the revision counter loses its uniqueness guarantee. Suggest never reading or writing the locked byte: create the file first without the lock, then lock a byte at a fixed offset past the data (for example offset 1 GiB, which Windows allows beyond EOF), or use LockFileEx through a dedicated lock handle. Consider retrying _write on a lock failure instead of dropping the update.

[REV-006] · medium · open · - · blocks:no — The new CLI tests decode child output with the Windows locale codec

tests/test_cycle_status.py _run_cursor_cli (:~440), run with capture_output=True, text=True and no encoding. --line output contains status icons, and _configure_stdout makes the child write UTF-8. On Windows the parent decodes with cp1252, raising UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f. result.stdout is then None and three tests fail with TypeError (test_cursor_ahead_of_status_revisions_resets_to_current_state, test_cursor_resumes_across_invocations_and_identical_timestamps, test_missing_cursor_emits_only_current_unfinished_cycles). Suggest encoding="utf-8" on the subprocess call, and the same in the other new cursor test that shells out. This does not change product output.

Security triage

No security_review.always_when rule is configured; the defaults apply and nothing matched. The change is local file locking and a user-supplied cursor path in a CLI, with no authentication, authorization, network, secret, dependency, or CI-workflow surface. Not a sensitive change: the security audit was skipped after triage.

Verification (executed)

  • python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q: 52 tests, OK (Linux).
  • python3 scripts/validate-package.py: VALID: 15 skills ….
  • git diff --check: exit 0.
  • CLI probes for REV-002 and REV-003 as above; the _next_revision_locked recovery probe for REV-001.

Unverified: the Windows msvcrt path (REV-005 is reasoning plus the reported CI failure, not a Windows run); the full 1,460-test suite and claude plugin validate . were not re-run.

CI (parallel policy; read once, not awaited)

At head 51f04aa: Skills, manifests, and Bash installer passed (2 runs); PowerShell installer failed in run 38881199289 and is in progress in run 38881194005. 2 passed, 1 failed, 1 pending. This is a state report, not a finding.

Residual risk

The lock-free monitor fallback can in theory skip an intermediate revision when two writers publish out of order; low risk, not raised.

Verdict

CHANGES_REQUESTED. REV-005 blocks approval. Fix it, then fix REV-006 so the Windows suite can pass.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-003] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-004] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

Rereview (recovered attempt verification): PR #252 (work item #247), head 51f04aa1806624e7d79f2a549058cab7ef558aa1

Status: CHANGES_REQUESTED. I verified attempt attempt-d4431dc08e1f405e94d865f3373f9e4d against the complete accumulated diff (merge base cf6cf92, 704 lines, SHA-256 76bbab93…2b10, read in sections). REV-001 to REV-004 are resolved. REV-005 (high, blocks approval) and REV-006 remain open on this head. The head has not moved since that attempt.

What changed since the previous review

Nothing. The head is the one the recovered attempt reviewed.

Previous findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Executed: with .revision set to garbage, -1, and empty, each CycleStatusWriter._write() advanced the snapshot (revisions 2, 3, 4) and repaired the counter file.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Executed: --status-dir <nonexistent> exits 0 and does not create the directory. A mode-555 status directory exits 0, emits the snapshot, and has no traceback.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

Executed: a cursor of 50 against a snapshot at revision 3 emits the snapshot, exits 0, and rewrites the cursor to 3.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Verified in the diff and the tree: docs/instrumentation.md:939 and the [Unreleased] section of CHANGELOG.md describe --cursor-file.

[REV-005] · high · open · - · blocks:yes — The Windows revision lock reads the byte it locks, so contending writers drop their status update

scripts/cycle_status.py _revision_file_lock, the os.name == "nt" branch. Each caller does handle.seek(0); handle.read(1) and then msvcrt.locking(..., LK_LOCK, 1) on that same byte. Windows byte-range locks are mandatory, so a contender's read of byte 0 fails while another handle holds the lock. The OSError is swallowed by CycleStatusWriter._write, so the update is dropped. This matches the failed required check PowerShell installer (run 38881199289): test_concurrent_status_writes_get_unique_monotonic_revisions got [1] instead of [1..8]. I could not run Windows here, so the mechanism is inferred from the code and that CI result. It is not reproduced. The finding stays open because the lock logic is unchanged. Suggested fix: never read or write the locked byte. Lock a byte beyond the data, or use a dedicated lock handle, and retry _write on a lock failure.

[REV-006] · medium · open · - · blocks:no — The new CLI tests decode child output with the Windows locale codec

tests/test_cycle_status.py _run_cursor_cli calls subprocess.run(..., capture_output=True, text=True) with no encoding. The child writes UTF-8 (_configure_stdout) and --line output carries status icons, so on Windows the parent decodes with cp1252 and the three tests listed in the CI digest fail with UnicodeDecodeError and TypeError. Confirmed in the diff. Suggested fix: encoding="utf-8" on that call.

New findings

None beyond the two recovered above.

Security triage

No security_review.always_when rule is configured; the defaults apply and nothing matched. The change is local file locking and a user-supplied cursor path in a CLI, with no authentication, authorization, network, secret, dependency, or CI-workflow surface. Not a sensitive change: the security audit was skipped after triage.

Verification (executed)

  • python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q: 52 tests, OK (Linux).
  • python3 scripts/validate-package.py: VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • git diff --check cf6cf92 HEAD: exit 0.
  • CLI probes for REV-001, REV-002, and REV-003 as above.

Unverified: the Windows msvcrt path (REV-005 and REV-006 rest on code reading and the CI result), the full 1,460-test suite, and claude plugin validate ..

CI (parallel policy; read once, not awaited)

At head 51f04aa: Skills, manifests, and Bash installer passed (2 runs); PowerShell installer failed in run 38881199289 and is pending in run 38881194005. 2 passed, 1 failed, 1 pending. This is a state report, not a finding.

Residual risk

The lock-free monitor fallback can in theory skip an intermediate revision when two writers publish out of order; low risk, not raised.

Verdict

CHANGES_REQUESTED. REV-005 blocks approval. The structured result is in the stage response.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-003] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

Resolution follow-up: required Windows check

Status: RESOLVED. The failed PowerShell installer check on reviewed head 51f04aa1806624e7d79f2a549058cab7ef558aa1 was caused by this change. The failure log showed two causes: the subprocess tests decoded emoji progress output using Windows CP1252, and concurrent threads did not serialize through msvcrt byte-range locking. The fix sets the test subprocess encoding to UTF-8 and adds a process-wide thread guard around the existing cross-process file lock. The fix commit is f8928c7bbead5dff0127b3166ae752a4898a38a2.

Findings

These earlier review outcomes remain unchanged:

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Verification (agent-reported)

  • rtk python3 -m unittest tests.test_cycle_status.CycleStatusTests.test_concurrent_status_writes_get_unique_monotonic_revisions tests.test_cycle_status.CycleStatusTests.test_cursor_resumes_across_invocations_and_identical_timestamps tests.test_cycle_status.CycleStatusTests.test_missing_cursor_emits_only_current_unfinished_cycles tests.test_cycle_status.CycleStatusTests.test_cursor_ahead_of_status_revisions_resets_to_current_state -v — exit 0; 4 tests passed.
  • rtk python3 -m unittest discover -s tests -q — exit 0; 1,460 tests passed.
  • rtk python3 -m unittest tests.test_cycle_status.CycleStatusTests.test_cursor_resumes_across_invocations_and_identical_timestamps -v — exit 0; CLI boundary regression passed.
  • rtk python3 -m py_compile scripts/cycle_status.py tests/test_cycle_status.py && rtk git diff --check && rtk python3 scripts/validate-package.py — exit 0; compile and diff checks passed, package validator returned VALID.
  • rtk proxy env CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude plugin validate . — exit 0; plugin validation passed (with non-blocking README install-line advice).
  • Fix-delta review from 51f04aa1806624e7d79f2a549058cab7ef558aa1 to f8928c7bbead5dff0127b3166ae752a4898a38a2 — no findings.

The Windows suite was not run locally; the fix is covered by the reported Linux regressions and the updated Windows CI run is pending.

Checks of pushed head

GitHub check state was read once for f8928c7bbead5dff0127b3166ae752a4898a38a2: 0 passed, 0 failed, 4 pending. Skills, manifests, and Bash installer has one queued and one in-progress run. PowerShell installer has two queued runs. Under the parallel CI policy, these remain for the cycle CI gate.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-003] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-004] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-003] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

[CCR-20261016-005] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

Rereview after the Windows fix: PR #252 (work item #247), head f8928c7bbead5dff0127b3166ae752a4898a38a2

Status: CHANGES_REQUESTED. The complete accumulated diff (merge base cf6cf92, 715 lines, SHA-256 ad6defd9…e089) was read in sections. REV-006 is resolved. REV-005 (high, blocks approval) is only partly fixed: the in-process thread race is closed, but the cross-process read of the locked byte remains.

What changed since the previous review

51f04aa to f8928c7: scripts/cycle_status.py wraps _revision_file_lock in a process-wide threading.Lock, and tests/test_cycle_status.py passes encoding="utf-8" to the cursor CLI helper.

Previous findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Unchanged since the verified rereview; the revision-counter code did not change in this delta.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Unchanged since the verified rereview.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

Unchanged since the verified rereview.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Unchanged since the verified rereview.

[REV-005] · high · open · - · blocks:yes — The Windows revision lock reads the byte it locks, so contending writers drop their status update

scripts/cycle_status.py _revision_file_lock, os.name == "nt" branch (about lines 489-513). The fix adds _REVISION_FILE_THREAD_LOCK, which serializes threads of one process and addresses the failed test_concurrent_status_writes_get_unique_monotonic_revisions. The lines that caused the root cause are unchanged: every caller still runs handle.seek(0); handle.read(1) before msvcrt.locking(..., LK_LOCK, 1) on byte 0. Windows byte-range locks are mandatory per handle, so when another process holds the lock, this read raises PermissionError. The thread lock does not cover other processes. CycleStatusWriter._write swallows that OSError and drops the update. Two writers in separate processes sharing one status directory (they share the single .revision counter) can lose an update this way. So can a writer that overlaps the polling monitor's locked read (main, create=False). The resolver comment's claim that the fix serializes access holds for threads only. I could not run Windows here; this follows from the code and Windows locking semantics and is not reproduced. The updated Windows CI run, which only exercises threads, would not detect it either. Suggested fix: never read or write the locked byte. Lock a byte beyond the data, such as offset 1 with the file seeded first, or use a separate lock handle. Optionally retry _write once on a lock failure.

[REV-006] · medium · resolved · valid · blocks:no — The new CLI tests decode child output with the Windows locale codec

Verified in the diff: _run_cursor_cli now passes encoding="utf-8" (tests/test_cycle_status.py:442). The child writes UTF-8 (_configure_stdout), so the decode now matches. Windows execution is pending in CI.

New findings

None.

Security triage

No security_review.always_when rule is configured; the defaults apply and nothing matched. The delta touches an in-process lock and a test encoding, with no authentication, authorization, network, secret, dependency, or CI-workflow surface. Not a sensitive change: the security audit was skipped after triage.

Verification (executed, Linux)

  • python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q: 52 tests, OK.
  • python3 scripts/validate-package.py: VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • git diff --check cf6cf92 HEAD: exit 0.

Unverified: the Windows msvcrt path (REV-005 rests on code reading), the full 1,460-test suite, and claude plugin validate ..

CI (parallel policy; read once, not awaited)

At head f8928c7: 0 passed, 0 failed, 4 pending (Skills, manifests, and Bash installer ×2 and PowerShell installer ×2, runs 38887321461 and 38887327745). This is a state report, not a finding.

Residual risk

Lock-free monitor fallback can in theory skip an intermediate revision when two writers publish out of order; low risk, not raised.

Verdict

CHANGES_REQUESTED. REV-005 blocks approval.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-003] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-004] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-005] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-004] · cheap_coder · openai/gpt-6-luna→? · high · triaged:f8928c7bbead5dff0127b3166ae752a4898a38a2 · schema:2

Triage for resolve attempt: PR #252 (work item #247)

All six findings were reconciled against the trusted review history and the current head f8928c7bbead5dff0127b3166ae752a4898a38a2 before edits. REV-001–004 and REV-006 retain their prior valid dispositions and resolved status. REV-005 is valid and remains open; its Windows cross-process lock path still reads the byte before trying to acquire a lock on that same byte. The supplied complete diff is the accumulated diff at this head; the fix-delta review base for this attempt is f8928c7bbead5dff0127b3166ae752a4898a38a2.

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Previously resolved by recovering invalid or negative counters from the highest visible snapshot revision before incrementing.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Previously resolved by avoiding creation of a missing status directory and falling back to atomically replaced snapshots if the read lock cannot be acquired.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

Previously resolved by resetting a stale cursor to the current state and emitting unfinished cycles.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Previously resolved by updating docs/instrumentation.md and adding the feature to the [Unreleased] changelog.

[REV-005] · high · open · valid · blocks:yes — The Windows revision lock reads the byte it locks, so contending writers drop their status update

The prior fix serializes threads in one process, but the Windows path still reads byte 0 before acquiring a mandatory byte-range lock on byte 0. A separate process that owns that lock can therefore make the read fail; _write catches the resulting OSError, dropping the status update. The targeted change will remove all access to the lock byte before acquisition and add regression coverage for independent writer processes.

[REV-006] · medium · resolved · valid · blocks:no — The new CLI tests decode child output with the Windows locale codec

Previously resolved by setting encoding="utf-8" on the cursor CLI subprocess helper.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-003] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-004] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-005] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:251b7396c9f8c89aebc261859790be526f49c102 · schema:2

[CCT-20261016-002] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

[CCT-20261016-003] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

[CCT-20261016-004] · cheap_coder · openai/gpt-6-luna→? · high · triaged:f8928c7bbead5dff0127b3166ae752a4898a38a2 · schema:2

Resolution summary: PR #252 (work item #247)

Status: RESOLVED. REV-005 is fixed in commit 6328bcd42c7beef0e2ba53d01e943ef3e117314d. REV-001–004 and REV-006 remain resolved as previously recorded. The trusted review delta base f8928c7bbead5dff0127b3166ae752a4898a38a2 is an ancestor of the new head. The complete 87-line fix delta (SHA-256 7c2b819823eaeda3dbe168a487216e8897941f7a1956bff2fe9805e747f07edd) was reviewed; no findings remain.

Findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Previously resolved by recovering invalid or negative counters from the highest visible snapshot revision before incrementing.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Previously resolved by avoiding creation of a missing status directory and falling back to atomically replaced snapshots if the read lock cannot be acquired.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

Previously resolved by resetting a stale cursor to the current state and emitting unfinished cycles.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Previously resolved by updating docs/instrumentation.md and adding the feature to the [Unreleased] changelog.

[REV-005] · high · resolved · valid · blocks:yes — The Windows revision lock reads the byte it locks, so contending writers drop their status update

The Windows lock path now acquires the byte-range lock without first reading or initializing the locked byte. Added a cross-process regression that holds the lock in one process, verifies a second writer remains blocked, then checks that the writer publishes revision 1 after release. Fix commit: 6328bcd42c7beef0e2ba53d01e943ef3e117314d.

[REV-006] · medium · resolved · valid · blocks:no — The new CLI tests decode child output with the Windows locale codec

Previously resolved by setting encoding="utf-8" on the cursor CLI subprocess helper.

Verification (agent-reported)

  • python3 -m unittest tests.test_cycle_status.CycleStatusTests.test_status_write_waits_for_revision_lock_held_by_another_process -v — exit 0; 1 test passed.
  • python3 -m unittest tests.test_cycle_status -q — exit 0; 33 tests passed.
  • python3 -m unittest tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q — exit 0; 20 tests passed.
  • python3 -m unittest discover -s tests -q — exit 0; 1,461 tests passed.
  • python3 scripts/validate-package.py — exit 0; VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude plugin validate . — exit 0; validation passed with non-blocking README install-line advice.
  • git diff --check — exit 0.

The tests ran on Linux with Python 3.10. The Windows-specific msvcrt branch was not executable locally; the new cross-process test is part of the pending Windows check.

Checks of pushed head

Read once for 6328bcd42c7beef0e2ba53d01e943ef3e117314d: 0 passed, 0 failed, 4 pending. Skills, manifests, and Bash installer — pending (2 runs); PowerShell installer — pending (2 runs). The parallel CI policy leaves these for the cycle CI gate.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-003] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-004] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-005] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCR-20261016-006] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:251b7396c9f8c89aebc261859790be526f49c102 · schema:2

[CCT-20261016-002] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

[CCT-20261016-003] · cheap_coder · openai/gpt-6-luna→? · high · triaged:51f04aa1806624e7d79f2a549058cab7ef558aa1 · schema:2

[CCT-20261016-004] · cheap_coder · openai/gpt-6-luna→? · high · triaged:f8928c7bbead5dff0127b3166ae752a4898a38a2 · schema:2

Rereview: PR #252 (work item #247), head 6328bcd42c7beef0e2ba53d01e943ef3e117314d

Status: REVIEW_PASSED_AWAITING_CI. The complete accumulated diff (merge base cf6cf92, 772 lines, SHA-256 f73130fa…41ea, read in sections) was rereviewed. All six previous findings are resolved and no open finding blocks approval. The PowerShell installer check is still pending on this head, so this is not an approval; the CI gate decides (policy parallel).

What changed since the previous review

Head moved from f8928c7 to 6328bcd (fix for REV-005): _revision_file_lock no longer reads the byte it locks on Windows, and a cross-process regression test was added.

Previous findings

[REV-001] · medium · resolved · valid · blocks:no — A corrupt .revision file silently stops all status writes

Still fixed: _next_revision_locked recovers from the highest visible snapshot revision. test_invalid_revision_file_recovers_from_visible_status_revision passes.

[REV-002] · low · resolved · valid · blocks:no — A read-only monitor call now writes to the status directory

Still fixed: a missing directory is not created and a lock failure falls back to the snapshots. Covered by the two monitor tests, which pass.

[REV-003] · low · resolved · valid · blocks:no — A cursor ahead of the current revisions hides updates silently

Still fixed: a stale cursor resets to the current state. test_cursor_ahead_of_status_revisions_resets_to_current_state passes.

[REV-004] · low · resolved · valid · blocks:no — Docs and changelog are incomplete

Still fixed: CHANGELOG.md and docs/instrumentation.md carry the feature.

[REV-005] · high · resolved · valid · blocks:yes — The Windows revision lock reads the byte it locks, so contending writers drop their status update

Verified in the code: the os.name == "nt" branch now does seek(0) then msvcrt.locking(LK_LOCK, 1) with no read or write of the locked byte, and the lock file is otherwise untouched. Writers in separate processes therefore block on the lock instead of raising on a read. test_status_write_waits_for_revision_lock_held_by_another_process passes here on Linux (3 repeated runs, plus the thread-concurrency test). The msvcrt branch could not be executed locally; the Windows CI job is the only execution of that branch and is pending.

[REV-006] · medium · resolved · valid · blocks:no — The new CLI tests decode child output with the Windows locale codec

Still fixed: _run_cursor_cli sets encoding="utf-8".

New findings

None.

Security triage

Not a sensitive change: the security audit was skipped after triage. The change adds a local file lock and a caller-chosen cursor path to a local CLI. It touches no authentication, authorization, secrets, network input, or other trust boundary.

Verification (executed here, Linux, Python 3)

  • python3 -m unittest discover -s tests -q — exit 0; 1,461 tests passed.
  • python3 -m unittest tests.test_cycle_status tests.test_run_cycle.DetachFlagTests tests.test_installed_cycle -q — exit 0; 53 tests passed.
  • Lock tests repeated 3 times — stable.
  • python3 scripts/validate-package.py — VALID.
  • Not verified: the Windows msvcrt lock path (no Windows host); git diff --check/fetch of origin/main against a local ref (the runtime-supplied diff file, whose hash matches, was reviewed instead).

CI (read once, not awaited)

Head 6328bcd: 2 passed, 0 failed, 2 pending. Skills, manifests, and Bash installer — pass (2 runs). PowerShell installer — pending (2 runs).

Residual risk

msvcrt.LK_LOCK gives up after about 10 seconds of contention and raises OSError, which _write swallows as a dropped progress update. This needs a writer holding the lock for 10 seconds and is not a finding. Verdict: no blocking finding on this head; waiting on PowerShell installer.

@datacas
datacas merged commit 1fb034c into main Oct 16, 2026
4 checks passed
@datacas
datacas deleted the task-247 branch October 16, 2026 11:08
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.

Add a resumable cursor to cycle_status.py --line

1 participant