Skip to main content

Module fix_issues

Module fix_issues 

Source
Expand description

File DurableFixProposals as issues on the releases repo — the reporting half of self-correction.

super::ab_learnings already does the hard part: it folds a dogfooding round’s losses into ranked, evidence-backed proposals that name which CAR component to change and on what evidence. Until this module existed, that output was println!’d and written to learnings-<unix>.md, where nobody read it unless they had already gone looking — which defeats the purpose of an automated round.

§Why this is a sibling of super::merge and not an extension of it

super::merge::GitHubApi resolves its repository from the checkout’s origin remote, because a pull request must land where the branch was pushed. A defect report must NOT: it belongs on the releases repo, which is reachable from any deployment that has telemetry, with or without a source checkout. Folding issue filing into that trait would inherit exactly the repo-resolution rule that is wrong here, so the seam is separate and the repository is always an explicit argument.

That split is the whole reason reporting and correcting can live in different places: filing needs no source, fixing does.

§Idempotence

Every body carries <!-- car-fix-signature: <hex> -->, a hash over the proposal’s stable identity — its target component and failure pattern. Deliberately not the title (wording drifts) and not evidence_tasks (those change every round, which would make each re-run a fresh duplicate).

The search is scoped to open issues. A signature whose issue was closed and then recurs gets a new report, and that is the intended behaviour rather than an oversight: recurrence after a fix is a real signal that the fix did not hold, and silently swallowing it would hide the most interesting case.

§The marker is a dedup id, and the report target is public

Parslee-ai/car-releases is world-writable: anyone with a GitHub account can open an issue on it. The signature marker is plain text in that public repository, so anyone can paste one into an issue of their own — which used to be enough to make this module see AlreadyOpen and suppress a real defect report indefinitely. Deduplication therefore honours a marker only on an issue that super::provenance::resolve_tier puts at ProvenanceTier::Runtime: filed by the account this runtime authenticates as, carrying a signature recomputed here from a proposal held in memory. A marker on anyone else’s issue is recorded and ignored (Parslee-ai/car#1081).

Structs§

GhIssues
IssueApi over the real GitHub CLI.
ReportRecord
One proposal and what happened to it.

Enums§

ReportOutcome
What one proposal’s report attempt did.

Constants§

DEFAULT_REPORT_REPO
The default report target. Not the source repo: see the module docs.

Traits§

IssueApi
The GitHub issue operations reporting needs, behind a seam.

Functions§

clears_reporting_bar
Whether this proposal clears the bar for filing.
parse_issue_list
Parse a real gh issue list --json … payload into RawIssues.
parse_signature_marker
The signature carried by body, if it carries exactly one well-formed marker.
proposal_signature
The stable identity of a proposed fix: what to change, and what pattern motivated it. See the module docs for what is deliberately excluded.
render_issue_body
Render one proposal as an issue body, marker included.
render_report
A one-line-per-proposal summary for the round’s stdout.
report_proposals
File every proposal that clears the bar, skipping signatures already open on an issue this runtime actually filed.
signature_marker
The machine-readable handle embedded in every body.