Skip to content

refactor: read packets and repair dashboards from review records - #1896

Merged
obviyus merged 2 commits into
mainfrom
review-record-s5-s6
Oct 10, 2026
Merged

obviyus merged 2 commits into
mainfrom
review-record-s5-s6

Conversation

@obviyus

@obviyus obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move decision packet maintainer decisions/priority, repair selection and implementation intake, and dashboard audit/work/activity readers to the typed ReviewRecord.
  • Keep each missing-record legacy fallback byte/behavior compatible; unreadable records fail closed instead of trusting repeated prose or frontmatter.
  • Generalize readReviewRecordOrLegacy for narrow legacy projections instead of fabricated full decisions. No stored-format or schema changes.
  • Invalidate cached ineligible intake and prepared repair jobs when record-only eligibility/instructions change, while retaining exact revisions for equivalent backfills.
  • Keep the PR scoped to S5-S6. The handoff's S7 blockers section enumerates remaining apply/promotion/context/host-proof consumers for S6b before parser deletion.

Behavior proof

Claim: existing saved reports publish identical output after the reader cutover, while typed decisions win over stale text and corrupt records cannot authorize packets, repair work or dashboard results.

Surface/environment: Node 24.21.0, production-built apply-decisions --sync-comments-only, comment renderer, packet readers; isolated temporary reports with the existing recording gh fixture (no live GitHub mutations). Baseline ff328679cb3940489b2f2cd59e5bc69c3505e204 versus this branch.

  • Re-ran handoffs/clawsweeper-review-record/s4b/complete/proof.ts as s5-s6/proof.ts over the same 73 saved reports / 159 variants.
  • 147/147 readable comment variants byte-identical; 159/159 apply CLI results, all gh/label calls, comments and rewritten markdown identical.
  • Both builds reject all 12 corrupt-record renders (error stack paths differ, not published output); branch packet readers reject all 12. All 147 readable packet/close-blocking outputs match main.
  • All 147 readable intake revision hashes still match main (revisions.json); 12 corrupt records fail closed. Regression cases prove record-only prompt/validation and security/product-eligibility changes refresh prior jobs/audits.
  • Actual audit record loop over 80,000 synthetic large reports (~6.57 GB), followed by 80,000 packet reads, completed under a 512 MiB heap cap. Main peak/retained: 338.9/70.5 MiB; branch: 340.2/71.6 MiB. Identical audit counts, bounded memory. This uses the streaming-hydration 80k synthetic shape, not a newly downloaded production corpus.
  • Final intake revision sweep retains 80,000 digests from the same ~6.57 GB synthetic input under 512 MiB: 153.3 MiB peak, 18.4 MiB retained. proof-heads.json records the reuse boundary: the later isolated intake-revision fix did not change the complete-driver apply/comment/packet paths; its final behavior is covered by revision parity, memory and intake regressions.
  • Focused behavior regressions cover typed/text disagreements, missing-record compatibility and corrupt records for packet, repair and dashboard readers.

Artifacts: ~/Developer/.agents/handoffs/clawsweeper-review-record/s5-s6/{proof.ts,proof.out,proof-table.md,readers.json,revisions.json,memory-main.json,memory-branch.json,revision-memory.json,checks.log,codex-review-committed.log}. Full caller inventory: remaining-callers.json; grouped file:line list and next-slice boundary: STATUS.md → S7 blockers.

Validation

  • pnpm run build:all
  • 172 focused tests across decision-packets, review-record, review-record-dashboard, repair/workflow-utils, repair/create-job, repair/issue-implementation-intake and intake-publish
  • pnpm run lint
  • pnpm run format:check
  • Final committed-head codex review --base origin/main: no actionable defects (166 focused tests independently passed). Earlier findings for a fixture mismatch and intake cache/job revision dependencies were fixed.

No full suite, production apply or merge. No Bay contract change: dashboard/ consumes host data independently and does not parse these reviewed fields. The changed report dashboard remains observer-only.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes decision packets, repair intake, and report dashboards read typed review records while preserving legacy-report fallbacks.

Example: A saved report has legacy priority P3 but its typed maintainer decision specifies P2.

  • Before: The decision packet uses P3.
  • After: The decision packet uses P2 from the typed record.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent with meaningful regression coverage; inspectable runtime evidence remains limited to the supplied account.
Proof confidence 🦐 gold shrimp (3/6) The supplied maintainer-authored classification exempts ordinary proof gating; the body describes built CLI and reader comparisons, but its local artifacts are unavailable for inspection.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Packets, repair instructions, and dashboard outcomes can disagree with the saved typed decision when repeated report text differs.
Reason: The scoped migration has clear operational value and follows the supplied maintainer-authored direction without adding configuration or public APIs.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR advances the typed-record migration with distinct work absent from main, and source review found no actionable introduced defect.

Priority: P2
Reviewed head: cdde5814ace69c5012c25724c17c6e8989884dd0

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported corpus CLI and memory traces are referenced through unavailable local paths, so their raw results could not be inspected.
Agent review details

How this fits together

Saved review reports supply decisions to packet generation, repair scheduling, and observer dashboards; host metadata continues to supply identity, publication state, and live safety checks.

flowchart LR
Reports[Saved reports] --> Reader[Typed record reader]
Reader --> Legacy[Legacy fallback when absent]
Reader --> Packets[Decision packets]
Reader --> Intake[Repair intake and revision checks]
Reader --> Dashboard[Report dashboards]
Loading

Technical review

Best possible solution:

Complete this scoped reader cutover while retaining absent-record compatibility and revision stability for equivalent backfills.

Do we have a high-confidence way to reproduce the issue?

This is a reader migration rather than a standalone bug report; source and added scenarios demonstrate how typed decisions replace stale repeated text.

Is this the best way to solve the issue?

The change extends existing record readers and preserves legacy behavior locally, avoiding a second decision owner or stored-format migration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a46cadd7e21d.

Provenance checked

  • Typed-record reader and failure contract keeps the original intent (277f5a0: Read saved typed decisions with legacy fallback only when the record is absent.)
  • Intake revision identity changes intended behavior with a stated reason (e641936: Prevent equivalent record backfills from redispatching implementation work.)
  • Decision-packet metadata safeguards keeps the original intent (2eb1787: Reject ambiguous report metadata instead of allowing injected text to authorize decisions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9ab7ed4 adds src/clawsweeper-dashboard.ts:83 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9ab7ed40220a; files: src/clawsweeper-dashboard.ts)
  • brokemac79: Raw commit 9d5fa3c adds src/decision-packets.ts:171 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 9d5fa3cbf736; files: src/decision-packets.ts)

Review metrics

Metric Value Why it matters
Production and regression coverage Production +186/-52 lines; tests +689/-7 lines Most added code exercises typed/text disagreements, legacy compatibility, corrupt records, and intake revision invalidation.

Labels

Label changes:

  • add P2: This is a useful internal consistency refactor without an established urgent production regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a useful internal consistency refactor without an established urgent production regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 10, 2026, 9:35 AM ET / 13:35 UTC.

@obviyus
obviyus merged commit 62a58f9 into main Oct 10, 2026
28 checks passed
@obviyus
obviyus deleted the review-record-s5-s6 branch October 10, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant