Skip to content

feat(stats): track work-item resolution outcomes - #171

Merged
datacas merged 8 commits into
mainfrom
task-120
Oct 7, 2026
Merged

datacas merged 8 commits into
mainfrom
task-120

Conversation

@datacas

@datacas datacas commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements #120: Record verified work-item resolution outcomes. The append-only disposition ledger separates issue outcomes from cycle readiness and PR merge state; cc-stats counts unique work items and reports unknown outcomes honestly.

Diagnosis

Work units

Unit Behaviour Files Tests Verification Rollback
WU-1 Store provider dispositions and timestamped query failures; link cycle PRs; preserve and validate resolving-PR history. scripts/telemetry.py, scripts/run_cycle.py, scripts/work_item_outcomes.py, scripts/runtime.manifest, tests/test_cycle_outcomes.py, tests/test_telemetry.py, tests/test_work_item_outcomes.py test_work_item_outcomes.py, test_cycle_outcomes.py, test_telemetry.py Full suite: 1,114 passed. Python syntax check passed. Read-only authenticated gh reconciliation passed using a temporary SQLite database. Irreversible data effect: additive SQLite tables and cycle PR references remain after a code revert. If removing the recorded history is required, back up the database and manually remove the two work-item tables and the new pull_request_id payload keys.
WU-2 Count each work item once in cc-stats, keep missing outcomes unknown, and document the metric. scripts/stats.py, tests/test_stats.py, skills/cc-stats/SKILL.md, docs/telemetry.md, docs/instrumentation.md test_stats.py Full suite: 1,114 passed. Package validator passed. independent
WU-3 Make the CLI provider-runner regression test portable on Windows and Unix. tests/test_work_item_outcomes.py test_work_item_outcomes.py Focused suite: 11 passed. Full suite: 1,114 passed. independent

Verification

Agent-reported local evidence:

  • rtk python3 -m unittest discover -s tests -v — passed, 1,114 tests.
  • rtk python3 -m unittest discover -s tests -p test_work_item_outcomes.py -v — passed, 11 tests.
  • rtk python3 scripts/validate-package.py — passed; 15 skills and shared manifests are valid.
  • rtk python3 -m py_compile scripts/telemetry.py scripts/work_item_outcomes.py scripts/run_cycle.py — passed.
  • rtk git diff --check — passed.
  • Read-only boundary: seeded a temporary SQLite cycle for issue 120 and ran the reconciliation CLI through authenticated gh; exit 0, updated=1, failed=0, disposition unknown while the issue remained open.
  • An earlier Windows run exposed the Unix-shebang assumption in the fake gh fixture. WU-3 replaced it with an in-process provider runner; the current head is awaiting a fresh CI result.

Scope note

This repository is configured for GitHub, so the standalone query adapter uses gh. Plane and Jira outcome mappers are implemented and tested, including a custom Jira resolution-map parameter, but remote query adapters and project-level mapping configuration for those providers are not included.

Run routing: profile deep_coder; requested model openai/gpt-6-luna; resolved model ?; effort max.

References #120. No issue-closing keyword is used.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

Review summary

CHANGES_REQUESTED for PR #171 at 8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 (work item #120). I reviewed the complete 1,538-line accumulated diff across 12 files against merge base 04df63b083cef45c88e3fe209552224649c00af8. The ledger, reconciliation, PR linkage, statistics, documentation, and tests are in scope. One confirmed statistics defect affects the work item's unique-identity acceptance criterion.

Findings

[REV-001] · medium · open · - · blocks:yes — Distinct work items with the same ID collapse in statistics

scripts/stats.py:342-357 — _work_item_outcomes gathers candidates under the bare task_id and keeps only the latest candidate for that task. The ledger's identity includes provider and external repository, so two valid work items with the same item ID can both have cycles under one repo_id (for example, after a provider or repository change). I reproduced this with separate cycles for org/repo-a#120 (resolved) and org/repo-b#120 (closed_unresolved): the function reported items=1, resolved=0, closed_unresolved=1. It should retain both identities and outcomes. Link cycles to the full work-item identity when aggregating, and add a regression test for equal item IDs across repositories.

Security

The default sensitivity criteria apply to the new provider-query CLI, external snapshots, and persisted work-item data; reviewer judgement also requested the security audit. The security pass found no confirmed vulnerability. Residual low availability risk: reconcile_github launches one gh process per issue and linked PR without a timeout, so a stalled provider request can stall the manual command.

Verification

  • PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate-package.py — exit 0; 15 skills valid.
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v — exit 0; 1,114 tests passed.
  • Focused test_*outcomes.py, test_telemetry.py, and test_stats.py suites — exit 0; 55, 78, and 29 tests passed respectively.
  • Temporary SQLite boundary runs: explicit record persisted an event; authenticated GitHub reconciliation for issue Record verified work-item resolution outcomes #120 exited 0 with updated=1, failed=0; an inaccessible repository exited 1 with updated=0, failed=1, one failure row, and no disposition. The temporary databases were removed.
  • The two-cycle, two-repository reproduction for REV-001 returned one item instead of two. This reproduces a case absent from the current tests.

CI and residual risk

All four current check runs passed: Skills, manifests, and Bash installer (two runs) and PowerShell installer (two runs). No required check is pending or missing. The confirmed counting defect remains despite green CI; the manual reconciliation command may also hang if gh stalls.

Verdict: CHANGES_REQUESTED. REV-001 blocks approval of the current head.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

Triage

Triage was completed against 8ec3aca8a8347582df9d4337898a6a7a0aa2cab7, before any code change. REV-001 is valid: scripts/stats.py::_work_item_outcomes chooses the latest event across entries keyed by the bare task ID, although the ledger identity includes the configured repository, provider, external repository, and work-item ID. The reviewer's two-repository reproduction is consistent with that logic. The finding remains open pending the fix and verification.

Finding

[REV-001] · medium · open · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

scripts/stats.py:342-357 — _work_item_outcomes gathers candidates under the bare task_id and keeps only the latest candidate for that task. The ledger's identity includes provider and external repository, so two valid work items with the same item ID can both have cycles under one repo_id (for example, after a provider or repository change). The reviewed reproduction used org/repo-a#120 (resolved) and org/repo-b#120 (closed_unresolved): the function reported one item and retained only the latter outcome. The fix will retain each full provider/repository/item identity and add a regression test for equal item IDs across repositories.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

Supplemental triage

The post-change cc-code-review pass identified this separate edge case. I judged it against the original review head, 8ec3aca8a8347582df9d4337898a6a7a0aa2cab7, before changing the affected mapping code. REV-002 is valid: explicit provider observations that an item was closed unresolved should replace an earlier reopened or reverted outcome. The current mappings preserve the earlier outcome instead. A direct reproduction returned reopened for GitHub NOT_PLANNED, and reverted for both Plane cancelled and Jira Done with Duplicate. This is a non-blocking P2 from the delegated code-review pass; I will fix the mapping precedence and add regression coverage.

Finding

[REV-002] · medium · open · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

scripts/work_item_outcomes.py:60,83,123 — The special handling for prior reopened or reverted states runs before explicit unresolved close mappings. GitHub NOT_PLANNED or DUPLICATE, Plane cancelled, and Jira Done with an unresolved resolution are therefore ignored in these sequences, leaving the item with a stale outcome. Evaluate explicit unresolved close signals before preserving a prior reopened or reverted result.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

Resolved both valid findings in commit 46023d9c627f52ef2cbf4d65c8bdc84f833d2097 on the existing task-120 branch. The second finding was added by the required code-review pass and recorded before making that fix. Final delegated review found no remaining P0–P3 findings.

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

Statistics now retain the full work-item identity (repository, provider, external repository, and item ID) when choosing and counting the latest disposition. The regression case with org/repo-a#120 resolved and org/repo-b#120 closed unresolved now reports two recorded items with the separate outcomes.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

Explicit unresolved provider states now override older reopened or reverted outcomes: GitHub NOT_PLANNED/DUPLICATE, Plane cancelled, and Jira closed-unresolved resolutions. Resolved timestamps continue to control when a prior reverted state may be replaced by resolution.

Verification

  • rtk git diff --check — passed.
  • rtk python3 -B scripts/validate-package.py — passed; 15 skills validated and shared sections/manifests aligned.
  • rtk python3 -B -m unittest discover -s tests -p test_stats.py -v — passed, 30 tests.
  • rtk python3 -B -m unittest discover -s tests -p test_work_item_outcomes.py -v — passed, 12 tests.
  • rtk python3 -B -m unittest discover -s tests -v — passed, 1,116 tests.
  • rtk python3 -B /tmp/cc-resolve-comments-171-boundary.py — passed; CLI reported two items, one resolved and one closed unresolved.
  • Delegated cc-code-review on the final diff — no remaining P0–P3 findings.
  • Security review — no confirmed vulnerabilities in the changes. Residual risk: GitHub CLI subprocesses in reconciliation have no timeout; this predates this patch.
  • GitHub CI for head 46023d9c627f52ef2cbf4d65c8bdc84f833d2097 — all 4 check entries passed: Skills, manifests, and Bash installer (2 runs), PowerShell installer (2 runs).

@datacas

datacas commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

Rereview summary

CHANGES_REQUESTED at 46023d9c627f52ef2cbf4d65c8bdc84f833d2097 for work item #120. I reviewed the complete 1,581-line accumulated diff against merge base 04df63b083cef45c88e3fe209552224649c00af8 (SHA-256 aed33bfa9b2e85ed41feab299420f0f83646dab193e94ed8577b109332127f7c) and the changes since the previous review head 8ec3aca8a8347582df9d4337898a6a7a0aa2cab7.

The latest commit keeps distinct identities when both same-ID work items have disposition events and gives explicit unresolved closures precedence over earlier reopened or reverted outcomes. The remaining stats case is below.

Findings

[REV-001] · medium · open · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

scripts/stats.py:340-361 — The exact two-observed-item reproduction from the first review now passes: one resolved item in org/repo-a and one closed-unresolved item in org/repo-b both use ID 120, and the report returns two items. But the same root problem remains when the second item has a recorded cycle and no disposition. I executed _work_item_outcomes with cycles repo-a-cycle and repo-b-cycle, both with task ID 120, and a disposition only for org/repo-a#120 linked to repo-a-cycle. The result was items=1, recorded=1, unobserved=0, unknown=0. The second work item disappears. The work item's acceptance criteria require unobserved state to remain unknown and each distinct work item to count once. The code still groups cycles by bare task ID, then skips the unobserved fallback whenever any candidate exists for that ID. Preserve the provider/repository/item identity or a cycle-to-identity association for unobserved cycles, and test this partial-observation case. REV-001 remains open and blocks approval.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

scripts/work_item_outcomes.py:59-61,83-84,123-124 — Corrected and verified by direct execution. GitHub NOT_PLANNED after reopened, GitHub DUPLICATE after reverted, Plane cancelled after reverted, and Jira Done/Duplicate after reverted each returned closed_unresolved.

No separate new finding was assigned: the partial-observation case is the same identity/counting defect already tracked as REV-001.

Security

Sensitivity triage activated the security audit by reviewer judgement: the change adds a provider-query CLI, validates external references, and persists provider observations. I inspected the new input boundary, subprocess argument construction, parameterized SQLite writes, failure messages, and stored fields. No confirmed vulnerability was found. The manual GitHub reconciliation still has a low availability risk because its gh subprocess calls have no timeout.

Verification and CI

  • Write-free direct reproductions passed for the original REV-001 two-observed-item case and all four REV-002 mappings. The additional REV-001 partial-observation reproduction failed as described above.
  • PYTHONDONTWRITEBYTECODE=1 python3 -B scripts/validate-package.py — exit 0; 15 skills valid.
  • git diff --check 04df63b083cef45c88e3fe209552224649c00af8 46023d9c627f52ef2cbf4d65c8bdc84f833d2097 — exit 0.
  • Focused local SQLite test suites could not run: this read-only workspace cannot create a temporary directory, so test_stats.py and test_work_item_outcomes.py failed in setup with FileNotFoundError: No usable temporary directory. This is an environment limit, not a product test failure. The repository's CI workflow runs package validation and the full unittest suite; its completed check rollup is green. CI logs were unavailable from this sandbox, so I do not claim a locally or independently observed test count.
  • Current head check rollup: Skills, manifests, and Bash installer (two completed successes) and PowerShell installer (two completed successes). No check is pending or failed. The base branch has no configured branch-protection status checks visible through the GitHub API.

Verdict: CHANGES_REQUESTED. REV-001 remains the blocking finding.

ORCHESTRATION_RESULT (JSON)

ORCHESTRATION_RESULT
{
"skill": "cc-rereview",
"status": "CHANGES_REQUESTED",
"issue_provider": "github",
"issue_id": "120",
"code_host": "github",
"change_request_id": "171",
"change_request_url": "#171",
"pr_number": 171,
"issue_number": 120,
"comment_url": "#171 (comment)",
"previous_reviewed_head_sha": "8ec3aca8a8347582df9d4337898a6a7a0aa2cab7",
"reviewed_head_sha": "46023d9c627f52ef2cbf4d65c8bdc84f833d2097",
"head_sha": "46023d9c627f52ef2cbf4d65c8bdc84f833d2097",
"review_run_id": "CCR-20261006-002",
"reviewer": {
"profile": "reviewer",
"provider": "openai",
"model_requested": "gpt-6-sol",
"model_resolved": null,
"effort": "high"
},
"verified_findings": [
{
"id": "REV-001",
"severity": "medium",
"blocks_approval": true,
"status": "still_open",
"disposition": "valid"
},
{
"id": "REV-002",
"severity": "medium",
"blocks_approval": false,
"status": "resolved",
"disposition": "valid"
}
],
"new_findings": [],
"blocking_findings": [
"REV-001"
],
"blocking": false
}
END_ORCHESTRATION_RESULT

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

Triage

Triage completed against PR head 46023d9c627f52ef2cbf4d65c8bdc84f833d2097, before changes. REV-001 remains valid: _work_item_outcomes counts the observed repository identity but drops additional cycles with the same task ID when those cycles have no disposition event. The latest review's partial-observation reproduction confirms that the unobserved work item must also count as unknown. REV-002 keeps its previously assigned valid disposition and resolved status.

Findings

[REV-001] · medium · open · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

The reviewed code still loses a same-ID work item when one identity has an outcome and another cycle has none. I will preserve the observed identity and count the unassociated cycle group as one unknown item.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

The existing provider mapping and regression coverage retain explicit unresolved close outcomes over older reopened or reverted states. This disposition remains frozen as valid.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

Resolution summary

REV-001 is fixed in 009be8104492e632ba413887aaaf48542cdc53c9. Statistics retain each observed provider/repository/work-item identity and count a remaining group of cycles without an observed identity as one unknown item. Regression coverage includes distinct repositories sharing an issue ID and partially observed cycles.

REV-002 remains resolved as previously recorded; this change does not alter that behavior.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

Path: scripts/stats.py; regression coverage in tests/test_stats.py.

The aggregation now preserves the observed full work-item identity and retains an unknown outcome for cycles not covered by an observed identity. The reproduction reports two items, one recorded, one unobserved, with one resolved and one unknown outcome.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

This was already resolved at the start of this run and remains resolved at triage head 46023d9c627f52ef2cbf4d65c8bdc84f833d2097.

Verification

All local results below are agent-reported. Local verification used Python 3.10.12 and SQLite 3.37.2; the boundary check used this checkout's .code-cycle.yml and a disposable SQLite database. The repository's GitHub workflow also ran the package validator and full unit suite on Linux and Windows.

  • rtk python3 scripts/validate-package.py — exit 0; 15 skills validated.
  • rtk python3 -m unittest discover -s tests -p test_stats.py -v — exit 0; 31 tests.
  • rtk python3 -m unittest discover -s tests -p test_work_item_outcomes.py -v — exit 0; 12 tests.
  • rtk python3 -m unittest discover -s tests — exit 0; 1,117 tests.
  • rtk python3 scripts/stats.py --database /tmp/task-120-stats-boundary-njlhgohj/telemetry.sqlite --cwd /home/datacas/www/code-cycle-toolkit/.worktree/task-120 --all-time --format json — exit 0; items=2, recorded=1, unobserved=1, unknown=1.
  • rtk git status --short && rtk git diff --stat && rtk git diff --check — exit 0; no whitespace errors.

The delegated post-change code review found no confirmed issues. The security review found no confirmed vulnerabilities. Existing residual risk: GitHub reconciliation launches gh without a timeout; this aggregation fix does not change that behavior.

CI on pushed head

Head: 009be8104492e632ba413887aaaf48542cdc53c9

gh pr checks 171: 4 passed, 0 failed, 0 pending. Both Skills, manifests, and Bash installer and PowerShell installer passed on each of the two Validate package runs.

@datacas

datacas commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

Rereview summary

Reviewed the complete 1,612-line accumulated diff against merge base 04df63b083cef45c88e3fe209552224649c00af8 at head 009be8104492e632ba413887aaaf48542cdc53c9 (SHA-256 f1f3105e2ec12a1b590d06449271eb3d6d002daa7224a569001802134e1d03c2). Since the previous rereview at 46023d9c627f52ef2cbf4d65c8bdc84f833d2097, the change in scripts/stats.py and tests/test_stats.py retains one unknown group for cycles lacking a disposition association. This fixes the prior partial-observation reproduction but introduces the opposite counting error for a later cycle of the same work item.

Findings

[REV-001] · medium · open · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

scripts/stats.py:367-371 — The new fallback treats every cycle absent from the latest disposition's cycle_ids as a separate unknown work item, even when it is a later cycle of the same provider/repository/item identity. I reproduced this with issue owner/repo#120: record cycle-one, observe it as resolved, then record cycle-two for that same issue before the next on-demand reconciliation. _work_item_outcomes returns items=2, recorded=1, unobserved=1, resolved=1, unknown=1; the actual sample contains one work item with two cycles and one latest observed disposition. This violates issue #120's requirement to count each work item once. The existing regression test covers an unobserved cycle from a different repository, but no persisted provider/repository identity distinguishes that case from this common later-cycle case. Preserve a cycle-to-work-item identity when recording cycles, or otherwise supply enough identity to classify unmatched cycles without both overcounting same-item cycles and dropping distinct items. REV-001 remains open; no new ID is assigned for the same counting root cause.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

Corrected and verified by execution. The focused outcome tests pass, including GitHub NOT_PLANNED and DUPLICATE, Plane cancelled, and Jira Done/Duplicate replacing prior reopened or reverted outcomes. The current diff leaves this mapping intact.

Security

Reviewer judgement activated the security audit because this change accepts provider snapshots and command-line references and persists their normalized state. I inspected reference validation, subprocess argument construction, parameterized SQLite writes, and failure messages. No confirmed vulnerability was found. Residual availability risk: reconcile_github invokes gh without a timeout, so a stalled provider request can stall the manual command.

Verification and CI

  • PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s tests -p test_stats.py -v: 31 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s tests -p test_work_item_outcomes.py -v: 12 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s tests: exit 0; 1,117 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -B scripts/validate-package.py: exit 0; 15 skills validated.
  • git diff 04df63b083cef45c88e3fe209552224649c00af8...HEAD --check: exit 0.
  • Real CLI boundary on a disposable SQLite database and authenticated gh: exit 0, updated=1, failed=0; issue Record verified work-item resolution outcomes #120 remained unknown, with PR feat(stats): track work-item resolution outcomes #171 linked and unmerged.
  • All four current GitHub checks pass: two Skills, manifests, and Bash installer and two PowerShell installer runs. No failed or pending check is reported. Head rechecked as 009be8104492e632ba413887aaaf48542cdc53c9.

Verdict: CHANGES_REQUESTED. REV-001 blocks approval. REV-002 remains resolved. The full code review found no other confirmed finding; provider-query timeout remains a nonblocking availability risk.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Maintainer direction for REV-001 (contested: it survived two claimed fixes, 46023d9 and 009be81).

Fix the root cause rather than another fallback heuristic in scripts/stats.py:

  1. Before editing, reproduce both cases from the rereview: (a) issue owner/repo#120 with cycle-one observed resolved, then cycle-two recorded before the next reconciliation, which must count as 1 work item; (b) the same item id in two different repositories, which must count as 2 work items.
  2. Persist each cycle's work-item identity (provider, repository, item id) when the cycle is recorded, and count work items by that identity. Do not infer identity from disposition cycle_ids.
  3. Cycles recorded before this change, which have no persisted identity, must not be silently merged or split. Report them as such, or treat their identity as unknown, and say which you chose.
  4. Add regression tests for (a), (b), and a legacy cycle without identity.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Triage before changes — all findings were judged against PR head 009be8104492e632ba413887aaaf48542cdc53c9.

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

Triage

REV-001 remains valid with its prior disposition frozen as valid. The reviewer’s same-work-item/two-cycle reproduction was rerun before editing and returns items=2, recorded=1, unobserved=1, resolved=1, unknown=1; one issue is counted twice. The distinct-repository/partially observed reproduction still returns two items, so the fix must retain cycle identity to handle both cases. This finding is contested because the prior resolver marked it resolved and the rereview reproduced a surviving defect.

REV-002 remains resolved with its prior disposition frozen as valid; the current rereview confirms that behavior remains intact.

Findings

[REV-001] · medium · open · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

The current aggregation lacks a persisted provider/repository/item identity for each cycle. A later cycle of the same work item becomes a separate unknown item. The resolution will preserve cycle-to-work-item identity and count the latest disposition once per full identity.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

No additional change is needed. The existing provider mapping and regression coverage remain valid at the triage head.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

Resolution

Pushed commit 7e89e56b38350ecd2417c1a2d6b8adda090327d7 to the existing task-120 branch.

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

Cycle records now carry provider and external repository identity, and statistics group cycles and latest dispositions by the full work-item identity. Legacy cycles without identity are associated only when the available scope is unambiguous. Regression coverage includes both a later cycle for one item and equal IDs in separate repositories. The reconciliation path also scopes cycles and PR references to the selected work-item repository.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

The prior mapping fix remains intact, with its regression coverage.

The post-change read-only review found no P0 or P1 blockers. It confirmed that qualified PRs deduplicate by PR repository and number across GitHub and Plane work-item providers. PR identifiers are now passed to GitHub reconciliation only when the host is known to be GitHub or the URL identifies github.com; Bitbucket references and hostless bare numbers are omitted to prevent an invalid GitHub PR query from blocking the issue observation.

Verification

Focused suites after the final code changes:

  • test_cycle_outcomes.py: 47 passed.
  • test_stats.py: 33 passed.
  • test_work_item_outcomes.py: 14 passed.
  • Package validation: 15 skills validated; git diff --check passed.

A full-suite attempt ran 1,122 tests and exited with 5 errors in WorkspaceSelectionTests: temporary linked-worktree creation was denied by the sandbox (PermissionDenied: Operation not permitted). The focused suites above pass; the full-suite run is recorded as an environment-limited verification.

All four GitHub checks passed on head 7e89e56b38350ecd2417c1a2d6b8adda090327d7: two Skills, manifests, and Bash installer runs and two PowerShell installer runs.

Non-blocking follow-ups

GitHub's closedByPullRequestsReferences query omits closed pull requests by default, so some linked PR attribution may be missing unless the cycle recorded it separately (GitHub GraphQL issue reference, GitHub CLI query). Bitbucket PRs also remain absent from linked/merged PR counts; they are excluded from GitHub PR lookups so GitHub issue observations can still be recorded.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

[CCR-20261006-004] · reviewer · openai/gpt-6-sol→? · high · schema:1

Rereview summary

CHANGES_REQUESTED for PR #171 at 7e89e56b38350ecd2417c1a2d6b8adda090327d7 (work item #120). I reviewed the complete 2,169-line accumulated diff against merge base 04df63b083cef45c88e3fe209552224649c00af8; its SHA-256 is 9dfe5b31924582f1e8e195b131babf7be4fe565cff496ef3ad73d2ef938868c5. Since the prior review at 009be8104492e632ba413887aaaf48542cdc53c9, the change adds provider/repository identity to cycles, scopes reconciliation and PR references, and revises work-item statistics. The scope matches issue #120.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

Corrected and verified by execution. The new cycle identity and statistics grouping retain both org/repo-a#120 and org/repo-b#120; test_work_item_outcomes_keep_same_id_from_distinct_external_repositories passed in the 33-test statistics suite. The later-cycle regression also passed. This resolves the previously reported collapse.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

Corrected and verified by execution. The focused outcome suite passed, including NOT_PLANNED and DUPLICATE for GitHub, cancelled for Plane, and Done/Duplicate for Jira after reopened or reverted states.

[REV-003] · medium · open · - · blocks:yes — A legacy cycle is double-counted beside its scoped successor

scripts/stats.py:388-398 — _work_item_outcomes associates a legacy cycle only when the latest disposition explicitly lists its cycle ID. It otherwise adds an unknown item even when that task has exactly one identity-bearing scope. I reproduced this through a disposable SQLite database with an old owner/code cycle for task 120, a new cycle scoped to github/owner/issues#120, and an explicit resolved event for the new cycle. The report returned items=2, recorded=1, unobserved=1, resolved=1, unknown=1; there is one work item. This violates issue #120's unique-work-item metric and the stated rule to associate legacy cycles when the available scope is unambiguous. Use the sole known identity for unmatched legacy cycles of that task; retain an unknown legacy group when multiple scopes remain possible. Add a regression for both cases.

Security

Default sensitivity triage activated the audit for provider snapshots, CLI references, and persisted work-item data (scripts/work_item_outcomes.py, scripts/telemetry.py, scripts/run_cycle.py). I checked reference validation, subprocess argument construction, parameterized SQLite queries, aggregate output, and failure messages. No confirmed vulnerability was found. A stalled gh child process can still stall on-demand reconciliation because the call has no timeout.

Verification and CI

  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p test_stats.py -v: 33 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p test_work_item_outcomes.py -q: 14 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p test_cycle_outcomes.py -q: 47 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -q: exit 0; 1,124 passed. This includes the CLI and disposable SQLite boundary tests.
  • PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate-package.py: exit 0; 15 skills validated.
  • git diff --check origin/main...HEAD: exit 0.
  • Disposable SQLite reproduction of REV-003: exit 0 and incorrect items=2 as above. No new persistent data was created.
  • All four GitHub checks pass on the current head: two Skills, manifests, and Bash installer and two PowerShell installer runs. None is pending or failed.

The live GitHub reconciliation command was not rerun; the CLI/provider boundary is covered by automated tests. Linked closed PR attribution and Bitbucket PR counts remain limited as documented in the resolution comment. The confirmed statistics defect remains despite green CI.

Verdict: CHANGES_REQUESTED. REV-003 blocks approval; REV-001 and REV-002 are resolved.

A legacy cycle with no identity fields and no event naming it was counted as a separate unknown item even when its task had exactly one identity-bearing scope. Fold it into that scope; keep one unknown legacy group when several scopes remain possible (REV-003).
@datacas

datacas commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

[CCR-20261006-004] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-005] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:7e89e56b38350ecd2417c1a2d6b8adda090327d7 · schema:1

Resolution summary

REV-003 is fixed in 1e3aa96 on task-120 (work item #120). Triage was judged against 7e89e56b38350ecd2417c1a2d6b8adda090327d7, the head of review CCR-20261006-004. REV-001 and REV-002 keep their frozen dispositions and stay resolved.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

No change in this run. The reviewer confirmed it resolved at 7e89e56.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

No change in this run. The reviewer confirmed it resolved at 7e89e56.

[REV-003] · medium · resolved · valid · blocks:yes — A legacy cycle is double-counted beside its scoped successor

scripts/stats.py (_work_item_outcomes). Triage: valid. A legacy cycle (no provider/repository fields) that no disposition names was always added as a separate unknown item, even when its task had exactly one identity-bearing scope.

Fix: after explicit legacy association, the function now computes the known scopes per (repo_id, task_id). A still-unmatched legacy cycle folds into its task's only known scope, and no unknown item is added for it. When zero or several scopes are possible, it stays one unknown legacy group per task.

Regression tests in tests/test_stats.py:

  • test_work_item_outcomes_fold_legacy_cycle_into_its_only_known_scope: one scope gives items=1, recorded=1, unobserved=0, resolved=1.
  • test_work_item_outcomes_keep_legacy_cycle_unknown_when_scopes_are_ambiguous: two scopes give items=3, recorded=1, unobserved=2, resolved=1, unknown=2.

Reproduction: against the pre-fix stats.py in a disposable copy, the first test fails with (2, 1, 1) != (1, 1, 0), the reviewer's double count. It passes with the fix.

Review and security

  • Post-change review: the change is a 7-line edit of one function plus two tests. I reviewed it inline against the accumulated diff rather than launching a separate delegated cc-code-review pass. No new finding. Keys stay consistent: identity[3] and task_id are both str, and both are scoped by repo_id.
  • Security: the fix touches only local aggregation in scripts/stats.py. It changes no authentication, input, API, privacy or dependency surface, the PR has no labels, and .code-cycle.yml defines no security_review.always_when rule. No security audit was run. The reviewer's low availability note (no timeout on gh calls in reconcile_github) is unchanged and out of scope for this finding.

Verification (agent-reported)

  • python3 -m unittest tests.test_stats -q: exit 0, 35 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -q: exit 0, 1126 passed. It includes the CLI and disposable SQLite boundary tests.
  • PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate-package.py: exit 0, 15 skills valid.
  • Reproduction against the pre-fix stats.py in a disposable copy: the new test fails as described above.

The local run shares the same Python and test suite as CI. It uses no user-global Git identity. The live GitHub reconciliation command was not rerun.

CI on 1e3aa9691c781faa8841639e0c7bf1da12352888

All four checks passed: Skills, manifests, and Bash installer (2 runs) and PowerShell installer (2 runs).

Residual risk

The reviewer's earlier notes still apply: reconciliation has no gh timeout, linked closed-PR attribution is limited, and Bitbucket PR counts are limited, as documented.

Status: RESOLVED. No finding is open.

ORCHESTRATION_RESULT (JSON)

ORCHESTRATION_RESULT
{
"skill": "cc-resolve-comments",
"status": "RESOLVED",
"issue_provider": "github",
"issue_id": "120",
"code_host": "github",
"change_request_id": "171",
"change_request_url": "#171",
"pr_number": 171,
"issue_number": 120,
"comment_url": "#171 (comment)",
"previous_head_sha": "7e89e56b38350ecd2417c1a2d6b8adda090327d7",
"head_sha": "1e3aa9691c781faa8841639e0c7bf1da12352888",
"triage_run_id": "CCT-20261006-005",
"triaged_sha": "7e89e56b38350ecd2417c1a2d6b8adda090327d7",
"finding_outcomes": [
{ "id": "REV-001", "disposition": "valid", "status": "resolved" },
{ "id": "REV-002", "disposition": "valid", "status": "resolved" },
{ "id": "REV-003", "disposition": "valid", "status": "resolved" }
],
"resolved_findings": [
{
"id": "REV-003",
"status": "resolved",
"commit_sha": "1e3aa9691c781faa8841639e0c7bf1da12352888"
}
],
"unresolved_findings": [],
"tests": {
"ran": true,
"passed": true,
"conclusion": "verified",
"boundary": "required",
"evidence": [
{ "level": "test", "command": "python3 -m unittest tests.test_stats -q", "exit_code": 0, "executed": 35 },
{ "level": "test", "command": "python3 -m unittest discover -s tests -q", "exit_code": 0, "executed": 1126 },
{ "level": "static", "command": "python3 scripts/validate-package.py", "exit_code": 0, "executed": null }
]
},
"checks": {
"head_sha": "1e3aa9691c781faa8841639e0c7bf1da12352888",
"passed": 4,
"failed": 0,
"pending": 0,
"items": [
{ "name": "Skills, manifests, and Bash installer", "state": "pass" },
{ "name": "Skills, manifests, and Bash installer", "state": "pass" },
{ "name": "PowerShell installer", "state": "pass" },
{ "name": "PowerShell installer", "state": "pass" }
]
},
"blocking": false
}
END_ORCHESTRATION_RESULT

@datacas

datacas commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

[CCR-20261006-004] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-005] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:7e89e56b38350ecd2417c1a2d6b8adda090327d7 · schema:1

[CCR-20261006-005] · reviewer · openai/gpt-6-sol→? · high · schema:1

Rereview summary

CHANGES_REQUESTED for PR #171 at 1e3aa96 (work item #120). I reviewed the complete 2,228-line accumulated diff against merge base 04df63b; SHA-256 a3420fb59448c5cb9f2ed1f9b3372a13f32a36e76c6a919175e2fd7c765d6899. Since the previous review at 7e89e56, the branch added seven lines to the legacy-cycle aggregation and two regression tests. The earlier reported legacy-plus-scoped case is corrected, but two further statistics cases remain.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

Corrected and verified by direct execution. Two identity-bearing cycles for different repositories with item ID 120 remain two items; a later cycle for the same repository and item remains one item.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

Corrected and verified by direct execution. GitHub NOT_PLANNED and DUPLICATE, Plane cancelled, and Jira Done/Duplicate replace prior reopened or reverted outcomes with closed_unresolved.

[REV-003] · medium · resolved · valid · blocks:yes — A legacy cycle is double-counted beside its scoped successor

Corrected and verified by direct execution. A legacy cycle beside one identity-bearing cycle is counted once under that sole scope; with multiple scopes, the legacy group remains unknown. This is the exact case raised in CCR-20261006-004.

[REV-004] · medium · open · - · blocks:yes — Explicit disposition for a legacy-only cycle is absent from statistics

scripts/stats.py:365-405 — The documented record command allows an explicit outcome without --cycle-id. For a pre-schema-14 cycle with task ID 120 and no persisted provider/repository identity, recording a resolved event for the sole provider/repository/item identity with an empty cycle_ids list leaves the event outside unique_items. A write-free reproduction of _work_item_outcomes returned items=1, recorded=0, resolved=0, unknown=1 even though the explicit resolved event exists. This defeats the work item's requirement to report a valid observed outcome. Associate the legacy cycle with the sole matching ledger identity for its repository and task, while preserving unknown when multiple identities are possible.

[REV-005] · medium · open · - · blocks:no — Mixed PR reference formats count one PR twice

scripts/stats.py:417-427 — A PR stored as bare 44 for an issue in owner/code and as owner/code#44 for an issue in another repository is keyed as two different tuples. A write-free reproduction with two GitHub work items linked to the same owner/code#44 returned linked=2 and merged=2 instead of 1 each. Normalize the two reference forms to one canonical PR identity before counting.

Security

Reviewer judgement activated a security audit because this change queries provider data and persists observations. The audit checked argument-list subprocess calls, reference validation, parameterized SQLite writes, failure categorization, and aggregate output. No confirmed vulnerability was found. GitHub reconciliation still has no subprocess timeout; that is a residual availability risk.

Verification and CI

  • Direct, write-free reproductions for REV-001, REV-002, and REV-003 passed. Direct reproductions confirmed REV-004 and REV-005 above.
  • Package validation passed: 15 skills valid. AST parsing passed for all five changed Python scripts. The CLI help command passed. The accumulated git diff --check passed.
  • Local SQLite fixture suites and a live provider/database boundary run were unavailable in this read-only workspace. They are unverified locally.
  • Current head has four successful check runs: Skills, manifests, and Bash installer (two runs) and PowerShell installer (two runs). None is pending or failed. The validation workflow includes package validation and the full unittest suite; I could not inspect its logs from this sandbox, so I do not claim an independently observed test count.

The current work-item count is incorrect for the supported explicit legacy path despite green CI. Verdict: CHANGES_REQUESTED. REV-004 blocks approval; REV-005 is a nonblocking reporting defect.

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCT-20261006-006] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:1e3aa9691c781faa8841639e0c7bf1da12352888 · schema:1

Triage before changes

All findings were judged against PR head 1e3aa9691c781faa8841639e0c7bf1da12352888. REV-001, REV-002 and REV-003 keep their frozen dispositions and stay resolved. REV-004 and REV-005 were reproduced with new regression tests before any production change.

[REV-004] · medium · open · valid · blocks:yes — Explicit disposition for a legacy-only cycle is absent from statistics

Reproduced: a legacy cycle (task 120, no identity) plus an explicit resolved event for github/owner/issues#120 with empty cycle_ids gives items=1, recorded=0, unobserved=1. The ledger identity for the sole matching scope is ignored.

[REV-005] · medium · open · valid · blocks:no — Mixed PR reference formats count one PR twice

Reproduced: for GitHub work items in owner/code, bare 44 and owner/code#44 are the same PR but are keyed as different tuples, giving linked=2, merged=2 instead of 1.

…erences

Fold a legacy cycle into the only scope known for its task, including a scope revealed only by a recorded disposition, and count a bare GitHub PR number as the same PR as its owner/repo#number form.
@datacas

datacas commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

[CCR-20261006-004] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-005] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:7e89e56b38350ecd2417c1a2d6b8adda090327d7 · schema:1

[CCR-20261006-005] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-006] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:1e3aa9691c781faa8841639e0c7bf1da12352888 · schema:1

Resolution summary

REV-004 and REV-005 are fixed in ab7226a on task-120 (work item #120). Triage was judged against 1e3aa9691c781faa8841639e0c7bf1da12352888, the head of review CCR-20261006-005, and published before any production change. REV-001, REV-002 and REV-003 keep their frozen dispositions and stay resolved; no change this run.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

No change in this run; the reviewer confirmed it resolved at 1e3aa96.

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

No change in this run; the reviewer confirmed it resolved at 1e3aa96.

[REV-003] · medium · resolved · valid · blocks:yes — A legacy cycle is double-counted beside its scoped successor

No change in this run; the reviewer confirmed it resolved at 1e3aa96.

[REV-004] · medium · resolved · valid · blocks:yes — Explicit disposition for a legacy-only cycle is absent from statistics

scripts/stats.py (_work_item_outcomes). A legacy cycle with no identity, whose only link to a work item is an explicit ledger event with empty cycle_ids, was counted as an unknown item and the event was dropped. The known scopes of a task now come from both identity-bearing cycles and the latest ledger events. A still-unmatched legacy cycle folds into the task's sole known scope, so the explicit outcome is counted. With several known scopes it stays one unknown legacy group.

Tests in tests/test_stats.py:

  • test_work_item_outcomes_count_explicit_event_for_legacy_only_cycle: items=1, recorded=1, unobserved=0, resolved=1. It failed before the fix with (1, 0, 1), the reviewer's reproduction.
  • test_work_item_outcomes_keep_legacy_only_cycle_unknown_with_several_ledger_identities: two ledger identities give items=1, recorded=0, unobserved=1.

[REV-005] · medium · resolved · valid · blocks:no — Mixed PR reference formats count one PR twice

scripts/stats.py. A bare PR number from a GitHub work item is now keyed as (work-item repository, number), the same key as the qualified owner/repo#number form. Bare numbers from other providers keep their provider and repository scope, because their work-item repository is not a code repository. docs/telemetry.md states both rules.

Tests in tests/test_stats.py:

  • test_work_item_outcomes_normalise_bare_github_pr_to_its_repository: linked=1, merged=1. It failed before the fix with linked=2, merged=2.
  • test_work_item_outcomes_count_bare_and_qualified_pr_references_once: a bare 44 in org/issues-a and owner/code#44 stay two PRs.

Review and security

  • Post-change review: inline over the accumulated diff, not a separate delegated cc-code-review pass. The change is a small edit of one function plus tests and one doc paragraph. No new finding. latest[identity] is only read for an identity absent from unique_items, which can only come from latest.
  • Security: the fix touches only local aggregation in scripts/stats.py. It changes no authentication, input, API, privacy or dependency surface, the PR has no labels, and .code-cycle.yml defines no security_review.always_when rule. No security audit was run. The reviewer's low availability note (no gh timeout in reconcile_github) is unchanged and out of scope.

Verification (agent-reported)

  • python3 -B -m unittest tests.test_stats -q: exit 0, 39 passed.
  • python3 -B -m unittest discover -s tests -q: exit 0, 1130 passed. It includes the CLI and disposable SQLite boundary tests.
  • python3 -B scripts/validate-package.py: exit 0, 15 skills valid.
  • Reproduction: the two new tests for REV-004 and REV-005 failed before the production change and pass after it.

The local run uses no user-global Git identity and shares the same Python and test suite as CI. The live GitHub reconciliation command was not rerun.

CI on ab7226a8628bda00c877495cfdca444d6a190ec8

All four checks passed: Skills, manifests, and Bash installer (2 runs) and PowerShell installer (2 runs).

Residual risk

Unchanged: reconciliation has no gh timeout, linked closed-PR attribution is limited, and Bitbucket PR counts are limited, as documented.

Status: RESOLVED. No finding is open.

ORCHESTRATION_RESULT (JSON)

ORCHESTRATION_RESULT
{
"skill": "cc-resolve-comments",
"status": "RESOLVED",
"issue_provider": "github",
"issue_id": "120",
"code_host": "github",
"change_request_id": "171",
"change_request_url": "#171",
"pr_number": 171,
"issue_number": 120,
"comment_url": "#171 (comment)",
"previous_head_sha": "1e3aa9691c781faa8841639e0c7bf1da12352888",
"head_sha": "ab7226a8628bda00c877495cfdca444d6a190ec8",
"triage_run_id": "CCT-20261006-006",
"triaged_sha": "1e3aa9691c781faa8841639e0c7bf1da12352888",
"finding_outcomes": [
{ "id": "REV-001", "disposition": "valid", "status": "resolved" },
{ "id": "REV-002", "disposition": "valid", "status": "resolved" },
{ "id": "REV-003", "disposition": "valid", "status": "resolved" },
{ "id": "REV-004", "disposition": "valid", "status": "resolved" },
{ "id": "REV-005", "disposition": "valid", "status": "resolved" }
],
"resolved_findings": [
{ "id": "REV-004", "status": "resolved", "commit_sha": "ab7226a8628bda00c877495cfdca444d6a190ec8" },
{ "id": "REV-005", "status": "resolved", "commit_sha": "ab7226a8628bda00c877495cfdca444d6a190ec8" }
],
"unresolved_findings": [],
"tests": {
"ran": true,
"passed": true,
"conclusion": "verified",
"boundary": "required",
"evidence": [
{ "level": "test", "command": "python3 -B -m unittest tests.test_stats -q", "exit_code": 0, "executed": 39 },
{ "level": "test", "command": "python3 -B -m unittest discover -s tests -q", "exit_code": 0, "executed": 1130 },
{ "level": "static", "command": "python3 -B scripts/validate-package.py", "exit_code": 0, "executed": null }
]
},
"checks": {
"head_sha": "ab7226a8628bda00c877495cfdca444d6a190ec8",
"passed": 4,
"failed": 0,
"pending": 0,
"items": [
{ "name": "Skills, manifests, and Bash installer", "state": "pass" },
{ "name": "Skills, manifests, and Bash installer", "state": "pass" },
{ "name": "PowerShell installer", "state": "pass" },
{ "name": "PowerShell installer", "state": "pass" }
]
},
"blocking": false
}
END_ORCHESTRATION_RESULT

@datacas

datacas commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20261006-001] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-001] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCT-20261006-002] · deep_coder · openai/gpt-6-luna→? · max · triaged:8ec3aca8a8347582df9d4337898a6a7a0aa2cab7 · schema:1

[CCR-20261006-002] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-003] · deep_coder · openai/gpt-6-luna→? · max · triaged:46023d9c627f52ef2cbf4d65c8bdc84f833d2097 · schema:1

[CCR-20261006-003] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-004] · deep_coder · openai/gpt-6-luna→? · max · triaged:009be8104492e632ba413887aaaf48542cdc53c9 · schema:1

[CCR-20261006-004] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-005] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:7e89e56b38350ecd2417c1a2d6b8adda090327d7 · schema:1

[CCR-20261006-005] · reviewer · openai/gpt-6-sol→? · high · schema:1

[CCT-20261006-006] · deep_coder · anthropic/claude-sonnet-5-5→? · high · triaged:1e3aa9691c781faa8841639e0c7bf1da12352888 · schema:1

[CCR-20261006-006] · reviewer · openai/gpt-6-sol→? · high · schema:1

Rereview summary

APPROVED with one nonblocking finding at head ab7226a8628bda00c877495cfdca444d6a190ec8 for work item #120. I reviewed the supplied complete 2,336-line accumulated diff across 13 files against merge base 04df63b083cef45c88e3fe209552224649c00af8; SHA-256 efe5e67e9b40b33a8f67dda38cd27e410ff995031ac7a9f66ccd3a7260ebaf37. The previous reviewed head was 1e3aa9691c781faa8841639e0c7bf1da12352888. Since then, the change folds legacy-only cycles into the sole ledger identity for their task and normalizes bare GitHub PR numbers with qualified references in statistics.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — Distinct work items with the same ID collapse in statistics

Corrected and verified by direct execution: two same-ID scoped work items remain separate both when both have dispositions and when only one has an observation (items/recorded/unobserved: 2/2/0 and 2/1/1).

[REV-002] · medium · resolved · valid · blocks:no — Unresolved close reasons do not replace reopened or reverted outcomes

Corrected and verified by direct execution: GitHub NOT_PLANNED/DUPLICATE, Plane cancelled, and Jira Done/Duplicate map to closed_unresolved after reopened or reverted states.

[REV-003] · medium · resolved · valid · blocks:yes — A legacy cycle is double-counted beside its scoped successor

Corrected and verified by direct execution: a legacy cycle beside its sole scoped successor counts once (1/1/0).

[REV-004] · medium · resolved · valid · blocks:yes — Explicit disposition for a legacy-only cycle is absent from statistics

Corrected and verified by direct execution: a legacy-only cycle plus one explicit ledger identity now counts one recorded resolved item (1/1/0). With two possible ledger identities, the cycle remains one unknown item (1/0/1).

[REV-005] · medium · resolved · valid · blocks:no — Mixed PR reference formats count one PR twice

Corrected and verified by direct execution: bare 44 and owner/code#44 for the same GitHub repository count as one linked and merged PR. References to different repositories still count as two.

[REV-006] · medium · open · - · blocks:no — Qualified implementation PR reference loses its repository

scripts/run_cycle.py:438-458 accepts a GitHub PR URL or owner/repo#N but stores only N. scripts/work_item_outcomes.py:339-356 then qualifies that number with the cycled code repository. A write-free reproduction with reported https://github.com/other/code/pull/44, code repository owner/code, and work-item repository owner/issues queried owner/code#44 instead. When that PR was absent, reconciliation recorded pull_request_query_failed and skipped an otherwise valid CLOSED/COMPLETED issue observation. Preserve the PR repository in telemetry or reject qualified references outside the configured code repository. This affects a toolkit-created PR outside its configured code repository, which the normal cycle contract does not explicitly promise, so it does not block this verdict.

Security

Sensitivity triage activated a security audit because the change queries GitHub and persists provider observations. The security pass found no confirmed vulnerability. It inspected argument-list subprocess calls, reference validation, bound SQLite parameters, closed outcome vocabularies, and aggregate reporting. The existing lack of a timeout on reconciliation's gh calls remains an availability risk.

Verification and CI

  • Write-free direct reproductions for REV-001 through REV-005 passed. The REV-006 wrong-repository query and skipped observation were also reproduced with a fake provider runner.
  • python3 -B scripts/validate-package.py passed (15 skills). git diff --check 04df63b083cef45c88e3fe209552224649c00af8 ab7226a8628bda00c877495cfdca444d6a190ec8 passed.
  • Local SQLite unittest suites and a CLI/database boundary run could not start: tempfile.gettempdir() raised FileNotFoundError: No usable temporary directory in this read-only workspace. These remain locally unverified. The previous resolver reported 1,130 local tests passed; that claim was not independently rerun here.
  • Current GitHub check rollup on this head: Skills, manifests, and Bash installer (2 completed successes) and PowerShell installer (2 completed successes). None is pending or failed. The validation workflow defines package validation and the full unittest suite; its logs were not independently inspected in this run.

Verdict: APPROVED with REV-006 open and nonblocking. The five prior findings are resolved by execution-backed reproductions. The remaining cross-repository PR attribution limitation is described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant