Skip to content

feat(worker): keep publish history across publish-only retries (U8) - #22

Merged
Steel-tech merged 1 commit into
mainfrom
feat/publish-history
Sep 28, 2026
Merged

Steel-tech merged 1 commit into
mainfrom
feat/publish-history

Conversation

@Steel-tech

Copy link
Copy Markdown
Contributor

Implements U8 (requirement R15) of the factory-quality follow-ups plan in PR #21.

What changed

  • withPublishSummary (internal/worker/publish.go): when the publish value it replaces is already a summary object, that object is appended to a publish_history array (oldest first) before the new summary is written. Only the last 5 entries are kept.
  • A first publish, whose prior value is the "not_attempted" string, adds no history.
  • Size bound: if the result would exceed protocol.MaxResultBytes, history entries are dropped oldest first before the existing degradations (dropping phases, then the minimal verdict). If history empties, the key is removed.

Verification

  • just check passes (format, vet, boundary, definitions, full test suite, build).
  • New and extended tests in internal/worker/publish_ci_test.go:
    • red -> person's fix -> retry to green: publish green, one history entry carrying ci_failed, the red ci_ref and the failing check; first publish has no history;
    • repair exhausted -> person's fix -> retry: history keeps ci_repair_exhausted and its pushed round;
    • six retries keep only the last five;
    • an oversize history drops the oldest entries first, keeps phases, sets no truncated, and keeps the current verdict.

Mutation results (each compiled under go vet; all killed)

Mutant Failing tests
history not appended all 4 history tests
cap not applied last-five test
drop newest instead of oldest over-cap test
first publish (not_attempted string) added to history red-retry, exhausted-retry, last-five
stop dropping history (degrade phases instead) over-cap test

Not covered

  • A held summary that is later released by a retry also moves into history. That follows from the rule and is not separately tested.
  • When history has to be dropped entirely for size, nothing records that it was dropped. The report (U2) sees no history in that case.

🤖 Generated with Claude Code

withPublishSummary moves a summary it replaces into publish_history (at
most the last five, oldest first) so a retry no longer erases the stop
code, failures, and repair rounds of the run before it (R15). History is
the first thing dropped to stay within MaxResultBytes, oldest entry
first. A first publish, replacing the "not_attempted" string, adds none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a4c5455a-dd00-43e3-98e5-c6570e1fb451

📥 Commits

Reviewing files that changed from the base of the PR and between 8c542bb and f29a2e9.

📒 Files selected for processing (2)
  • internal/worker/publish.go
  • internal/worker/publish_ci_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Steel-tech
Steel-tech merged commit 21d1489 into main Sep 28, 2026
5 checks passed
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