Repository navigation
fix(aggregator): /api/actions.json?state=all returns history (#4620) - #7669
Merged
Merged
Conversation
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 8, 2026 11:55
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4620.
Problem
GET /api/actions.json?state=allreturned{"actions": []}while the actions store held applied history: the handler passed thestatequery value straight into a literala.state === statefilter, and no action ever has state"all". Audit/retrospective consumers (the weekly triage retrospective) read a false zero.Fix
state=allis now the explicit all-history read (no state filter applied).statevalue that is not a real action state (new,applied,rejected,superseded) returns 400 instead of a silent empty list, so a mistyped filter cannot masquerade as "no history".ACTION_STATESis exported fromsrc/actions.tsand reused by the handler.?state=newbehaviour is unchanged.Tests
New regression test in
test/actions.test.ts: posts an action, applies it, then pins that?state=alland?state=appliedreturn it,?state=newdoes not, and?state=bogusis a 400.Local (laptop):
bun test test/actions.test.ts— 26 pass, 0 fail (run withPM_AGG_FRESHNESS_PORT=4899because the live aggregator holds the default IPC port 4871 on that host).Queue task 13245, lane code-c.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.