org-history: Omit unset bot and repositoryFilter from snapshots - #121
bootc-bot[bot] wants to merge 1 commit into
Conversation
workflowRuns records already drop unavailable properties via sparseProperties(), but the snapshot header still serialized `bot: null` and `repositoryFilter: null` whenever --bot or --repo was not passed. Build the header through sparseProperties() too so absent options are omitted rather than written as null. coverage.aic.total keeps its explicit null, since there it means "not every eligible run has a known value" and CI asserts the key. Closes: #118 Assisted-by: AI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Okay it looks like I think a change in GH-AW to increase security broke the review agent? Do we need to tweak our @cgwalters-bot take this p0 for triage/analysis |
|
The fix agent was triggered by This fits the earlier comment about the review agent being broken. It seems to have applied the label without also posting its review body. Once the review agent is working again, re-run it so it posts actionable feedback. After that, re-applying
|
|
Not a Fix: cgwalters-forge#4 pins gh-aw back to v0.89.21 (the latest non-prerelease, which still has the bypass) and pins Claude Code to 2.1.285 so opus-5-5 keeps working. The lock files compile cleanly with no drift. The real fix belongs upstream: gh-aw should trust actors in the Generated-by: https://github.com/cgwalters/#llms |
Addresses #118 ("fix the generator to omit
nullif not present").workflowRunsrecords already drop unset values inscripts/org-history.js(workflowRunRecord→sparseProperties, with a unit test and a README note). The one place the generator still wrotenullfor something missing was the snapshot header:bot: nullandrepositoryFilter: nullwhenever--bot/--repowas not passed.This PR builds the header through
sparseProperties()as well, using a small exportedsnapshotHeader()helper so it can be unit-tested withoutgh. Key order is unchanged when the options are set.Not changed, on purpose:
coverage.aic.totalstays an explicitnull. There it means "not every eligible run has a known AIC value", and the CI snapshot-schema check asserts the key is present.history/2026-38.json/2026-39.jsonstill contain the oldnullfields. They were written by an older generator, and thehistory-immutabilityCI job makes weekly history append-only, so they are left as they are. Future weekly snapshots will be sparse.Validation
node --test tests/*.test.js: 17/17 pass, including a new test covering header output with and withoutbot/repositoryFilter.node --check scripts/org-history.js--repoand--bot, so itsrepositoryFilterassertion still holds.Assisted-by: AI
The change and unit test are LLM generated; they need human review.
🤖 Generated with [Claude Code]((claude.com/redacted)
nullif not present #118