Skip to content

fix: count findings from review result shapes (#81) - #100

Merged
datacas merged 4 commits into
mainfrom
issue-81-review-result-findings
Sep 25, 2026
Merged

datacas merged 4 commits into
mainfrom
issue-81-review-result-findings

Conversation

@datacas

@datacas datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Read finding counts from the documented initial review, rereview, and resolution result shapes.
  • Document still_open compatibility and include severity and blocking fields on verified rereview findings.
  • Add result-shape contract tests and redacted live Codex and Claude captures.

Work item: #81

Closes #81

Verification

  • python3 scripts/validate-package.py
  • python3 -m unittest discover -s tests -v — 720 tests passed

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Initial review — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

Verdict: CHANGES_REQUESTED — blocking findings: REV-001, REV-002.

Summary and scope

Reviewed the full diff origin/main...d606709da69e998b0e1577eebebb19b2f523aa21 (merge-base 7875beb, 1 commit, 11 files, +375/−32) against work item #81.

The runtime fix is sound: _findings now reads each role's documented shape. It counts open findings for review, open new_findings plus still_open/open verified_findings for rereview, and leaves unresolved_findings unchanged for resolve. findings_blocking prefers blocking_findings. The cc-rereview result example gains severity and blocks_approval, and the prose documents still_open ↔ open. The fake agent now emits a per-role shape and no longer puts unresolved_findings on a reviewer.

Item 6 of #81 is only partly delivered, and the CHANGELOG note that #81 requires is missing.

Conventions: repository instructions come from CONTRIBUTING.md. There is no AGENTS.md or CLAUDE.md. Language: English, following CONTRIBUTING.md and #81.

Findings

[REV-001] · high · open · - · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Paths: tests/test_finding_results.py, tests/fixtures/result-contracts/

#81 makes these acceptance criteria. None of them is met:

The fixture location (result-contracts/*.json instead of results/<role>.<executor>.txt) differs from #81 but is harmless. It is noted only for traceability.

[REV-002] · medium · open · - · blocks:yes — CHANGELOG note required by #81 is missing

Path: CHANGELOG.md

#81 ("Telemetry / schema impact") requires the CHANGELOG to note that review and rereview verdict rows written before this change carry no finding counts. The PR does not touch CHANGELOG.md, and ## [Unreleased] has no entry. Recent PRs (#98, #99) added their [Unreleased] entries in the same PR. Without the note, cc-stats users cannot explain why older review rows have findings_total=NULL and newer ones do not.

[REV-003] · medium · open · - · blocks:no — A finding without a status is counted as zero, not as unknown

Path: scripts/run_cycle.py line 801 (also line 806)

For review, and for new_findings in rereview, a finding counts only when status == "open". A result whose findings leave out status therefore records findings_total=0 and a full zero breakdown by severity. Observed:

_findings({"findings":[{"id":"REV-1","severity":"high","blocks_approval":True}]}, "review")
→ {'findings_total': 0, 'findings_blocking': 0, 'findings_critical': 0, 'findings_high': 0, ...}

This breaks #81's design rule "Unknown is not zero". A review that reported a high finding is recorded as clean. When the same payload also has blocking_findings: ["REV-1"], it records findings_blocking=1 > findings_total=0. The documented examples and the captures do include status, so the current skills do not trigger this. Newly created review findings are always open, though, so an entry without a status would be better read as open, or counted as unknown, than dropped.

[REV-004] · low · open · - · blocks:no — Duplicate IDs in verified_findings are counted independently

Paths: scripts/run_cycle.py line 810, tests/fixtures/result-contracts/codex-rereview.json

The real Codex rereview capture lists REV-003 twice, once still_open and once resolved. _findings counts the still_open entry, and test_redacted_runtime_captures_cover_roles_and_executors asserts that result (findings_total=2). Real output therefore produces duplicate IDs with conflicting statuses. The parser and the test accept that silently instead of deduplicating by ID or deciding which entry wins. The count is right only if the first entry happens to be the authoritative one.

Security triage

.code-cycle.yml declares no security_review.always_when, so the default triggers applied. There are no labels. The changed paths are a telemetry-count parser for agent output, a skill result example, a test fake, and redacted fixtures. None of them touches auth, secrets, dependencies, CI, or deployment. The fixtures carry placeholders only, and the validator's private-data check passed.

Not a sensitive change: the security audit was skipped after triage.

Verification performed

The preflight passed: local Python and a clean worktree on the PR head.

Command Result
python3 scripts/validate-package.py VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest discover -s tests Ran 720 tests … OK
Direct _findings probes (REV-003, REV-004) Reproduced as described above

Code inspection confirmed that tests/test_installed_cycle.py (test_a_second_round_is_recorded_as_a_second_round) now gets findings_total=2 and findings_blocking=1 on the review verdict row from the new per-role fake shape.

Unverified

  • Whether the fixtures are true live captures cannot be checked from the repository, because their provenance lacks a model and a commit (REV-001).
  • No test asserts that a real resolve dispatch row carries prior_findings_total taken from a _findings-parsed review. The existing test in test_stage_signals.py calls record_verdict directly. The path was checked by inspection only.

CI

gh pr checks 100: 4 passed, 0 failed. The workflow Validate package ran twice on the head, and both runs passed "Skills, manifests, and Bash installer" and "PowerShell installer". release.yml runs only on main and is not expected on a PR. No expected check is missing, pending, or skipped.

Residual risks

Verdict

CHANGES_REQUESTED: REV-001 and REV-002 block approval. REV-003 and REV-004 are recommended fixes.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Triage — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · ?/?→? · ? · triaged:d606709da69e998b0e1577eebebb19b2f523aa21 · schema:1

Dispositions below are frozen against the head above. The original review is preserved at the prior comment.

[REV-001] · high · open · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Valid. The tests do not yet guard fake payload keys against real fixtures/examples, exercise _tests and _status_of on captures, or record the required host/model/skill revision provenance. I will close these gaps. The existing JSON fixture location is harmless.

[REV-002] · medium · open · valid · blocks:yes — CHANGELOG note required by #81 is missing

Valid. #81 explicitly requires documenting that historical review/rereview rows have no finding counts; I will add that under Unreleased.

[REV-003] · medium · open · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Valid. An unclassified finding must not make a review appear clean. I will omit finding counts when the status needed to classify a review or rereview entry is missing or invalid.

[REV-004] · low · open · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Valid. The parser must not silently count duplicate IDs with conflicting statuses. I will deduplicate identical entries and omit counts when duplicate IDs conflict.

Triage complete. No code changes have been made yet.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Resolution update — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · ?/?→? · ? · triaged:d606709da69e998b0e1577eebebb19b2f523aa21 · schema:1

Triage dispositions remain frozen against d606709da69e998b0e1577eebebb19b2f523aa21. The targeted fixes are committed and pushed in dbb9566f879d8a8aee8d6638dce5602528c68b5a. Functional status: PARTIALLY_RESOLVED.

[REV-001] · high · open · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

The fake-shape guard now compares emitted key paths against the role fixture or documented result example. Fixture tests cover _findings, _tests, and _status_of. Fixture headers identify the GitHub host. The original capture sources did not retain the model or skill revision; those values are explicitly marked unknown rather than guessed. That provenance requirement remains open pending the source metadata.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Added an Unreleased note that older review/rereview verdict rows have no finding counts and that missing values are unknown, not zero.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Review and rereview counts are now omitted when finding status data is missing or invalid, so an unclassified entry cannot make a review appear clean.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Identical finding IDs count once; conflicting statuses or blocker fields make counts unknown. Duplicate IDs in blocking_findings count once, and conflicting explicit blocker IDs versus complete per-finding blocker flags make counts unknown. Regression tests cover these cases.

Verification

  • python3 scripts/validate-package.py — passed.
  • python3 -m unittest discover -s tests -v — 725 tests passed.
  • git diff --check — passed.
  • Post-change cc-code-review — no remaining findings.
  • GitHub checks for pushed head dbb9566f879d8a8aee8d6638dce5602528c68b5a — 4 passed, 0 failed.
  • Security triage found no configured trigger; no security audit was needed.

No approval or merge decision is implied.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Finding state update — PR #100

The triage disposition remains frozen against d606709da69e998b0e1577eebebb19b2f523aa21. Historical metadata cannot be reconstructed reliably, so no guessed model or skill revision will be added. Forward provenance requirements should be handled separately.

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

The finding is not applicable to the retained historical captures: their source did not preserve the requested model or skill revision, and that information is unrecoverable. The fixture fields remain explicitly unknown. Future captures need a separate provenance requirement.

PR #100 has no remaining open findings. Functional status: RESOLVED. No approval or merge decision is implied.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · ?/?→? · ? · triaged:d606709da69e998b0e1577eebebb19b2f523aa21 · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

Verdict: CHANGES_REQUESTED — blocking finding: REV-001, now narrowed to fixture provenance only.

Scope

  • Previous review: d606709da69e998b0e1577eebebb19b2f523aa21.
  • Current head: dbb9566f879d8a8aee8d6638dce5602528c68b5a, which adds 1 commit: fix: harden finding result contract (#100).
  • Reviewed the full diff origin/main...dbb9566, not only the new commit.
  • Conventions come from CONTRIBUTING.md. There is no AGENTS.md or CLAUDE.md. Language: English.
  • History was read from the trusted author datacas only, in 4 comments. No comment is from an untrusted author, and no ID collides. The latest trusted update set REV-001 to not_applicable. This re-review reassesses that status below.

What changed since the previous review

  • scripts/run_cycle.py:
    • _findings validates each finding's shape and status (_valid_findings).
    • Identical duplicate IDs are counted once. Duplicates with conflicting data make the counts unknown (_unique_findings).
    • Counts are also unknown when blocking_findings contradicts the complete per-finding blocks_approval flags (_blocking_findings_consistent).
    • Repeated blocker IDs are counted once.
  • tests/fakes/fake_agent.py: the per-role payload moves into result_for_role, so tests can call it.
  • tests/test_finding_results.py adds:
    • a fake-shape guard;
    • _status_of and _tests checks over the captures;
    • tests for a missing status, conflicting statuses, and duplicate IDs.
  • Fixtures: the capture headers gain host, plus model and skill_commit, both set to "unknown (not recorded in the capture source)".
  • CHANGELOG.md: a new [Unreleased] → Changed entry.

Previous findings

[REV-001] · high · open · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Paths: tests/fixtures/result-contracts/*.json, tests/fixtures/result-contracts/README.md

Two of the three parts are now fixed and verified by execution:

  • Fake-shape guard: fixed. test_fake_payload_keys_are_covered_by_fixture_or_documented_contract compares the key paths from fake_agent.result_for_role with the union of the role's fixture and its SKILL.md example. I injected unresolved_findings into the fake's review payload, and the test failed with ('unresolved_findings',) … not less than or equal to …. The guard detects exactly the drift that caused run_cycle: read finding counts from each review skill's documented result shape #81.
  • _status_of and _tests: fixed. test_redacted_runtime_captures_cover_roles_and_executors asserts both for all four captures, and it passes.

One part is still open:

  • Provenance. Every fixture records model and skill_commit as unknown.

The previous update set this finding to not_applicable because the metadata of these historical captures is unrecoverable. I do not agree with that status. What cannot be recovered is the metadata of these particular captures. The requirement itself is not obsolete. #81 asked for provenance with host, model, skill version or commit, and date, and it expected new captures: "The first step is therefore one live capture per role". One fresh dispatch per role, with its model and the toolkit commit recorded, meets the criterion. The runtime already takes model_requested from the routing, and the commit comes from the installed toolkit. Keeping the old captures with an explicit "unknown" is honest. It still leaves the acceptance criterion "Real-output fixtures exist for each role, with provenance" unmet.

This finding closes in either of two ways:

The disposition valid stays as it was.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Path: CHANGELOG.md

Verified in [Unreleased] → Changed: "Rows written before this change have no finding counts; their missing values are unknown, not zero." This is the note #81 asked for.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Path: scripts/run_cycle.py

Verified by execution. The same probe as last time now returns {}:

_findings({"findings":[{"id":"REV-1","severity":"high","blocks_approval":True}],"blocking_findings":["REV-1"]}, "review") → {}

test_missing_or_conflicting_finding_statuses_are_unknown covers it.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Path: scripts/run_cycle.py

Verified by execution:

  • A conflicting duplicate (REV-3 still_open and resolved) → {}.
  • An identical duplicate is counted once → findings_total: 1.
  • Covered by test_identical_duplicate_verified_findings_count_once and test_duplicate_blocking_ids_count_once.

The real Codex rereview capture now yields no counts at all (see Residual risks).

New findings

[REV-005] · low · open · - · blocks:no — Documentation does not describe the new "unknown count" rules

Path: docs/instrumentation.md (around line 541)

In docs/instrumentation.md, the prior_findings_* section and the verdict table (line 586) still describe only two rules: "absent is unknown" and "no partial severity breakdown". This PR adds three more cases in which a verdict records no finding counts at all:

  • an entry with a missing or invalid status;
  • a duplicate ID with conflicting data;
  • blocking_findings that contradicts per-finding blocks_approval.

It also maps the rereview still_open token to open. CONTRIBUTING.md asks that a behaviour change update "the page that owns that topic", and the PR diff touches no file under docs/. Without that update, a cc-stats reader who sees findings_total=NULL on a recent rereview row cannot tell whether the skill emitted nothing or the parser rejected a contradictory payload.

Security triage

.code-cycle.yml declares no security_review.always_when, so the default triggers apply. There are no labels. The new changes are validation logic in a parser that only produces telemetry counts, tests, and fixture metadata. None of them touches auth, secrets, dependencies, CI, or deployment.

Not a sensitive change: the security audit was skipped after triage.

Verification performed

These commands ran on dbb9566:

Command Result
python3 scripts/validate-package.py VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest discover -s tests Ran 725 tests … OK
python3 -m unittest tests.test_finding_results -v 10/10 ok
_findings probes for REV-003 and REV-004 As described above
Fake mutated to add unresolved_findings to review Guard failed as expected (1 failure)

Unverified

  • Whether the four fixtures are genuine live captures cannot be checked, because their provenance is unknown (REV-001).
  • No end-to-end test confirms that a resolve dispatch row carries prior_findings_total taken from a _findings-parsed review. The installed-cycle test asserts the review verdict counts only. This was checked by code inspection.

CI

gh pr checks 100 on dbb9566: 4 passed, 0 failed. The workflow Validate package ran twice, and both runs passed "Skills, manifests, and Bash installer" and "PowerShell installer". release.yml runs only on main. No expected check is missing, pending, or skipped. The PR is not a draft.

Residual risks

  • Codex really did emit a conflicting duplicate in the rereview capture. The stricter parser now records no counts for that output instead of a possibly wrong count. That is correct under "unknown is not zero". If real rereviews often repeat IDs, rereview rows will often have no counts, and the stats will stay sparse without showing an error.
  • _blocking_findings_consistent checks consistency only when every finding has an id and a boolean blocks_approval. Legacy rereview output without blocks_approval passes on blocking_findings alone.

Verdict

CHANGES_REQUESTED: REV-001, open for provenance only, blocks approval. REV-005 is a non-blocking documentation follow-up. REV-002, REV-003, and REV-004 are resolved and verified.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Triage update — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-002] · manual · ?/?→? · ? · triaged:dbb9566f879d8a8aee8d6638dce5602528c68b5a · schema:1

Dispositions are judged against current head dbb9566f879d8a8aee8d6638dce5602528c68b5a; prior assigned dispositions remain frozen. REV-001’s status follows the user’s direction that unavailable historical provenance is not applicable to those records. REV-005 is the only newly triaged finding.

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Disposition valid is preserved from the first triage. The user confirmed the metadata for these historical captures cannot be reconstructed and classified that historical requirement as not applicable; future provenance requirements are separate.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Disposition preserved. The required Unreleased note was added in CHANGELOG.md and verified in commit dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Disposition preserved. Missing or invalid finding status now leaves the count unknown; the regression test passed in commit dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Disposition preserved. Identical IDs count once; conflicting data or blocker signals leave counts unknown. The regression suite passed in commit dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-005] · low · open · valid · blocks:no — Documentation does not describe the new unknown-count rules

Path: docs/instrumentation.md. Valid: the telemetry guide documents when missing values remain unknown, but does not explain that malformed statuses, conflicting duplicate IDs, conflicting blocker signals, or rereview still_open can make a recent verdict omit finding counts. I will document those semantics before closing this finding.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Resolution summary — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-002] · manual · ?/?→? · ? · triaged:dbb9566f879d8a8aee8d6638dce5602528c68b5a · schema:1

Functional status: RESOLVED. Triage dispositions remain frozen; REV-001’s not_applicable status follows the user’s direction for unrecoverable historical metadata. The parser fixes are in dbb9566f879d8a8aee8d6638dce5602528c68b5a; the documentation fix is in 254510debb829a7bb1d25164e33147dd8d63d808.

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Historical model and skill revision metadata cannot be reconstructed reliably and remain explicitly unknown. Per the user’s decision, provenance expectations for future captures are a separate follow-up.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Added the required Unreleased note on historical review/rereview finding counts.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Missing or invalid status data now leaves review/rereview counts unknown.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Identical duplicate IDs count once; conflicting finding or blocker data leaves counts unknown. Duplicate blocker IDs count once.

[REV-005] · low · resolved · valid · blocks:no — Documentation does not describe the new unknown-count rules

docs/instrumentation.md now describes the role-specific result keys, rereview still_open mapping, and the conditions that leave counts unknown.

Verification

  • python3 scripts/validate-package.py — passed.
  • python3 -m unittest discover -s tests — 725 tests passed.
  • git diff --check — passed.
  • Post-change cc-code-review — no remaining findings.
  • GitHub checks on 254510debb829a7bb1d25164e33147dd8d63d808 — 4 passed, 0 failed.
  • Security triage found no configured trigger; no security audit was needed.

No approval or merge decision is implied.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · ?/?→? · ? · triaged:d606709da69e998b0e1577eebebb19b2f523aa21 · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-002] · manual · ?/?→? · ? · triaged:dbb9566f879d8a8aee8d6638dce5602528c68b5a · schema:1

[CCR-20260925-003] · manual · anthropic/opus→? · high · schema:1

Verdict: CHANGES_REQUESTED — blocking finding: REV-006, a new regression. Every previous finding is now closed.

Scope

  • Previous re-review: dbb9566f879d8a8aee8d6638dce5602528c68b5a.
  • Current head: 254510debb829a7bb1d25164e33147dd8d63d808, which adds 1 commit: docs: explain finding telemetry unknowns (#100). It changes docs/instrumentation.md only (+22).
  • Reviewed the full diff origin/main...254510d.
  • Conventions come from CONTRIBUTING.md. Language: English.
  • History was read from the trusted author datacas only, in 7 comments. No comment is from an untrusted author, and no ID collides. The highest ID is REV-005, so the new finding is REV-006.

Previous findings

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

The fake-shape guard and the _status_of/_tests coverage were verified by execution in the previous re-review, and they still pass. What remains is the model and skill-commit provenance of the historical captures. The work item's owner has now recorded on this PR that this metadata is not applicable to those records and that provenance for future captures is separate. That was one of the two ways to close this finding set out in the previous re-review, so I accept not_applicable as a scope decision by the owner.

The follow-up for future captures is not yet filed as an issue, and #81's text is unchanged. Both are noted under Residual risks. The disposition valid stays as it was.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Still present in CHANGELOG.md [Unreleased] → Changed. No regression.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Still verified: the regression tests pass on 254510d.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Still verified: the regression tests pass on 254510d.

[REV-005] · low · resolved · valid · blocks:no — Documentation does not describe the new unknown-count rules

Path: docs/instrumentation.md

Verified against scripts/run_cycle.py. The new paragraphs correctly describe:

  • the per-role keys;
  • still_open counted as open;
  • an empty list recording zero, an absent key recording nothing, and a non-list value leaving counts unknown;
  • an invalid status and a conflicting duplicate in a rereview making counts unknown;
  • how blocking_findings must agree with complete blocks_approval flags;
  • the rule for per-severity counts.

I checked each statement against the code. Only one case is left out: a non-string ID in blocking_findings also leaves the counts unknown. That omission is minor and does not reopen the finding.

New findings

[REV-006] · medium · open · - · blocks:yes — _findings crashes on a resolve entry that is not an object when blocking_findings is present

Paths: scripts/run_cycle.py (_blocking_findings_consistent, called from _findings), and line 704

For the resolve role, _findings takes unresolved_findings without validating the entries. The review and rereview branches, by contrast, go through _valid_findings. When the payload also has a blocking_findings list, _blocking_findings_consistent calls item.get("id") on each entry, and an entry that is not an object raises an exception. Observed on 254510d:

_findings({"unresolved_findings":["REV-1"],"blocking_findings":["REV-1"]}, "resolve")
→ AttributeError 'str' object has no attribute 'get'

On main, the same payload never reached .get on a string, because every access was guarded by isinstance(finding, dict). That makes this a regression introduced by this PR. The call at line 704 runs inside the stage loop and is not wrapped in any try. main() catches only CycleDriverError, so malformed agent output aborts the whole cycle with a traceback before the closing cycle row is written. Agent output is untrusted data, and this PR's stated rule is that a malformed result makes counts unknown, not that it stops the cycle.

The documented cc-resolve-comments result does not include blocking_findings, so the trigger is an off-contract payload. That is exactly the kind of drift this PR sets out to absorb.

Suggested fix: validate the resolve entries as objects, returning {} otherwise, or guard _blocking_findings_consistent with isinstance(item, dict). Add a regression test with a string entry.

Security triage

.code-cycle.yml declares no security_review.always_when, so the default triggers apply. There are no labels. The new commit is documentation only. The accumulated diff is a telemetry-count parser, tests, and fixtures. It touches no auth, secrets, dependencies, CI, or deployment. REV-006 is a robustness defect, not a security boundary: the payload comes from the executor the operator configured.

Not a sensitive change: the security audit was skipped after triage.

Verification performed

These commands ran on 254510d:

Command Result
python3 scripts/validate-package.py VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest discover -s tests Ran 725 tests … OK
_findings probe with a string entry and blocking_findings (resolve) AttributeError (REV-006)
_findings probe with a string entry and no blocking_findings {'findings_total': 1, 'findings_blocking': 0}, no exception
_findings({"findings":[],"blocking_findings":["REV-9"]}, "review") {}, consistent with the new docs

Unverified

  • There is still no end-to-end test that a resolve dispatch row carries prior_findings_total taken from a _findings-parsed review. This was checked by code inspection only.
  • REV-006 was reproduced at the function level. A full cycle aborted by a real agent was not run, and the abort path follows from reading the code.

CI

gh pr checks 100 on 254510d: 4 passed, 0 failed. The workflow Validate package ran twice (started 2026-09-25T19:56Z), and both runs passed "Skills, manifests, and Bash installer" and "PowerShell installer". release.yml runs only on main. No expected check is missing, pending, or skipped. The PR is not a draft.

Residual risks

  • The provenance follow-up for future captures that the REV-001 decision mentions has not been filed as an issue. Until it is, nothing stops a new fixture from landing with an unknown model and commit.
  • The real Codex rereview capture repeats an ID with conflicting statuses, so rereview rows will be NULL whenever an agent does the same. This is correct under "unknown is not zero", but stats coverage may stay low.

Verdict

CHANGES_REQUESTED: REV-006 blocks approval. REV-001 is not_applicable by the owner's decision. REV-002, REV-003, REV-004, and REV-005 are resolved.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Triage update — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

[CCR-20260925-003] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-003] · manual · ?/?→? · ? · triaged:254510debb829a7bb1d25164e33147dd8d63d808 · schema:1

Dispositions already assigned to REV-001 through REV-005 remain frozen. REV-006 is triaged against current head 254510debb829a7bb1d25164e33147dd8d63d808.

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Preserve the user's scope decision: historical capture provenance cannot be reconstructed reliably; future provenance is separate.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Previously resolved in dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Previously resolved in dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Previously resolved in dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-005] · low · resolved · valid · blocks:no — Documentation does not describe the new unknown-count rules

Previously resolved in 254510debb829a7bb1d25164e33147dd8d63d808.

[REV-006] · medium · open · valid · blocks:yes — _findings crashes on a resolve entry that is not an object when blocking_findings is present

Valid. _findings leaves resolve entries unvalidated, while _blocking_findings_consistent assumes every entry supports .get. The reported payload reproduces an exception on the triage head. I will make malformed entries yield unknown counts and add a regression test.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Resolution summary — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · ?/?→? · ? · triaged:d606709da69e998b0e1577eebebb19b2f523aa21 · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-002] · manual · ?/?→? · ? · triaged:dbb9566f879d8a8aee8d6638dce5602528c68b5a · schema:1

[CCR-20260925-003] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-003] · manual · ?/?→? · ? · triaged:254510debb829a7bb1d25164e33147dd8d63d808 · schema:1

Functional status: RESOLVED. Current head: f279c0d8e96805965e3541f7d32de4f7152e1ee7. The original dispositions remain frozen. REV-001 stays not_applicable by the user's scope decision for the historical captures; REV-006 was triaged valid against 254510debb829a7bb1d25164e33147dd8d63d808 and fixed in f279c0d8e96805965e3541f7d32de4f7152e1ee7.

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

The original model and skill revision metadata cannot be reconstructed reliably. The retained fields stay explicitly unknown; future-capture provenance is separate.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Added the Unreleased note on missing historical review and rereview counts in dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Missing or invalid statuses now leave review and rereview counts unknown, covered by regression tests in dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Identical IDs count once; conflicting finding data or blocker signals leave counts unknown. Duplicate blocker IDs count once. Verified in dbb9566f879d8a8aee8d6638dce5602528c68b5a.

[REV-005] · low · resolved · valid · blocks:no — Documentation does not describe the new unknown-count rules

docs/instrumentation.md documents role-specific result keys, still_open, and conditions that leave counts unknown. Committed in 254510debb829a7bb1d25164e33147dd8d63d808.

[REV-006] · medium · resolved · valid · blocks:yes — _findings crashes on a resolve entry that is not an object when blocking_findings is present

The resolve parser now returns unknown counts for non-object entries, with or without blocking_findings, instead of raising or counting malformed entries. test_malformed_resolve_entry_is_unknown_with_or_without_blocker_list covers both cases. Fix commit: f279c0d8e96805965e3541f7d32de4f7152e1ee7.

Verification

  • python3 scripts/validate-package.py — passed.
  • python3 -m unittest discover -s tests — 726 tests passed.
  • python3 -m unittest discover -s tests -p test_finding_results.py -v — 11 tests passed.
  • Direct malformed resolve probes with and without blocking_findings — both returned {}.
  • git diff --check — passed.
  • Post-change cc-code-review — no remaining findings.
  • GitHub checks on f279c0d8e96805965e3541f7d32de4f7152e1ee7 — 4 passed, 0 failed.
  • Security triage found no configured trigger; no security audit was needed.

Residual risks

  • Historical fixture model and skill revision remain unknown by owner decision; future provenance is out of scope for this change.
  • A separate end-to-end assertion that a resolve dispatch row receives prior_findings_total from a parsed review was not added in this pass; the path was inspected.
  • Conflicting duplicate IDs in real rereview output intentionally produce unknown counts rather than a potentially inaccurate total.

No approval or merge decision is implied.

@datacas

datacas commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #100

[CCR-20260925-001] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-001] · manual · ?/?→? · ? · triaged:d606709da69e998b0e1577eebebb19b2f523aa21 · schema:1

[CCR-20260925-002] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-002] · manual · ?/?→? · ? · triaged:dbb9566f879d8a8aee8d6638dce5602528c68b5a · schema:1

[CCR-20260925-003] · manual · anthropic/opus→? · high · schema:1

[CCT-20260925-003] · manual · ?/?→? · ? · triaged:254510debb829a7bb1d25164e33147dd8d63d808 · schema:1

[CCR-20260925-004] · manual · anthropic/opus→? · high · schema:1

Verdict: APPROVED — no open finding blocks approval. The reviewed head f279c0d8e96805965e3541f7d32de4f7152e1ee7 is the current head.

Scope

  • Previous re-review: 254510debb829a7bb1d25164e33147dd8d63d808.
  • Current head: f279c0d8e96805965e3541f7d32de4f7152e1ee7, which adds 1 commit: fix: ignore malformed resolve finding entries (#100). It changes scripts/run_cycle.py (+4/−1) and tests/test_finding_results.py (+8).
  • Reviewed the full diff origin/main...f279c0d.
  • Conventions come from CONTRIBUTING.md. Language: English.
  • History was read from the trusted author datacas only, in 10 comments. No comment is from an untrusted author, and no ID collides. The highest ID is REV-006, and this run adds no new finding.

Previous findings

[REV-001] · high · not_applicable · valid · blocks:yes — Real-output fixture contract from #81 item 6 is incomplete

Unchanged. It stays not_applicable by the owner's scope decision, since the provenance of the historical captures cannot be recovered. The fake-shape guard and the _status_of/_tests coverage still pass. The disposition valid stays as it was.

[REV-002] · medium · resolved · valid · blocks:yes — CHANGELOG note required by #81 is missing

Still present in CHANGELOG.md [Unreleased]. No regression.

[REV-003] · medium · resolved · valid · blocks:no — A finding without a status is counted as zero, not as unknown

Still verified: the regression tests pass on f279c0d.

[REV-004] · low · resolved · valid · blocks:no — Duplicate IDs in verified_findings are counted independently

Still verified: the regression tests pass on f279c0d.

[REV-005] · low · resolved · valid · blocks:no — Documentation does not describe the new unknown-count rules

Still present in docs/instrumentation.md. No regression.

[REV-006] · medium · resolved · valid · blocks:yes — _findings crashes on a resolve entry that is not an object when blocking_findings is present

Path: scripts/run_cycle.py

Verified by execution on f279c0d. The original reproduction no longer raises:

_findings({"unresolved_findings":["REV-1"],"blocking_findings":["REV-1"]}, "resolve") → {}
_findings({"unresolved_findings":["REV-1"]}, "resolve") → {}
_findings({"unresolved_findings":[{"id":"REV-1","severity":"high","blocks_approval":True}],"blocking_findings":["REV-1"]}, "resolve")
  → {'findings_total': 1, 'findings_blocking': 1, 'findings_critical': 0, 'findings_high': 1, 'findings_medium': 0, 'findings_low': 0}
_findings({"unresolved_findings":[]}, "resolve") → findings_total 0 with zero breakdown

The resolve branch now rejects entries that are not objects before any counting. _blocking_findings_consistent also guards against them, as defence in depth. test_malformed_resolve_entry_is_unknown_with_or_without_blocker_list covers both variants. Valid resolve payloads still produce the same counts.

New findings

None.

One non-blocking note. A resolve list containing an entry that is not an object used to be counted on main; it now records no counts at all. That is consistent with the "unknown is not zero" rule. The third paragraph added to docs/instrumentation.md names this case for review and rereview only (a missing or unrecognised status). A one-line mention for resolve would complete it. This is too minor to be a finding.

Security triage

.code-cycle.yml declares no security_review.always_when, so the default triggers apply. There are no labels. The new commit is an input-validation guard in a telemetry-count parser, plus a test. The accumulated diff touches no auth, secrets, dependencies, CI, or deployment.

Not a sensitive change: the security audit was skipped after triage.

Verification performed

These commands ran on f279c0d:

Command Result
python3 scripts/validate-package.py VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned
python3 -m unittest discover -s tests Ran 726 tests … OK
_findings probes for REV-006 (above) No exception. Malformed entries → {}, valid entries counted

Unverified

  • There is still no end-to-end test that a resolve dispatch row carries prior_findings_total taken from a _findings-parsed review. This was checked by code inspection only, and the resolver's summary acknowledges the gap.

CI

gh pr checks 100 on f279c0d: 4 passed, 0 failed. The workflow Validate package ran twice (started 2026-09-25T20:20Z), and both runs passed "Skills, manifests, and Bash installer" and "PowerShell installer". release.yml runs only on main and is not expected on a PR. No expected check is missing, pending, or skipped. The PR is not a draft.

Residual risks

  • No issue has been filed yet for the provenance of future fixture captures, which the REV-001 decision leaves as separate work.
  • Real rereview output that repeats an ID with conflicting data records no counts, so stats coverage for rereviews may be sparse.
  • The blocking_findings list stays authoritative whenever the per-finding blocks_approval flags are incomplete. This affects legacy rereview output.

Verdict

APPROVED: every previous finding is classified, and the only blocking ones are resolved (REV-002, REV-006) or not_applicable by the owner's decision (REV-001). No new finding was raised. All 4 checks on the current head passed. This verdict does not merge the PR.

@datacas
datacas merged commit 28a0c3a into main Sep 25, 2026
4 checks passed
@datacas
datacas deleted the issue-81-review-result-findings branch October 6, 2026 07:53
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.

run_cycle: read finding counts from each review skill's documented result shape

1 participant