Repository navigation
feat(pm-stack): production rollup ingestion — queue bindings/pool exports + aggregator ingestion (#18127) - #18130
Merged
developing-today-fleet[bot] merged 11 commits intoDec 1, 2026
Conversation
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/aggregator/src/spend-ingestion.ts
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/aggregator/test/spend-ingestion-18127.test.ts
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/aggregator/src/server-wiring.ts
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/aggregator/src/server.ts
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/aggregator/COST-ANOMALY.md
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/queue-bindings-export/queue-bindings-export.mjs
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/queue-bindings-export/queue-bindings-export.test.mjs
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/queue-bindings-export/README.md
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/queue-bindings-export/queue-bindings-export.service
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/queue-bindings-export/queue-bindings-export.timer
…, wiring (#18127) Lane 2052-P (bravo SUSTAIN 2052). File: pm-stack/queue-bindings-export/install-laptop.sh
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today-fleet
Bot
deleted the
archer/2052p-18127-rollup-ingestion
branch
December 1, 2026 03:45
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 #18127. Follow-on slice of #4825, filed by lane 2037-G from the design/decision record on #4825 (file-export route, producer-side exporters, aggregator-side ingestion). Lane 2052-P (bravo SUSTAIN 2026-11-30), claim comment 7299319124. Authored via the Git-API contents route (no checkout); every edited file's base was verified byte-identical to main at fd6bc06 before writing.
What lands
Queue-side bindings exporter —
pm-stack/queue-bindings-export/(new, in the shape ofpm-stack/opencode-usage-export/):queue-bindings-export.mjs: read-only pull over the queue's source dumps; emits the versioned bindings document (queue-bindings-export/v1,SpendLaneBinding[]) and pool document (queue-pool-export/v1,ProjectPoolItem[]), each with a coverage block (window start/end + whole-windowokassertion).okis asserted only when the source dump asserted completeness; conflicting duplicate bindings/pool refs are a hard failure, never a silent pick; a missing/invalid source writes a failure document and exits non-zero — a failed tick never looks like a reading.queue-bindings-export.test.mjs(node --test, offline fixtures), README, systemd service/timer,install-laptop.sh.Aggregator ingestion module —
pm-stack/aggregator/src/spend-ingestion.ts(new):PM_SPEND_INGESTION_ENABLED(only1/true; default off — off, no export is read and no store write happens, mirroring thePM_COST_ANOMALY_ENABLEDactivation tests).startSpendRollupIngestion, wired inserver.tsfromserver-wiring.ts'sspendRollupIngestion), it reads the usage export + bindings export + pool export from configured paths (env overrides; defaults under~/atlas/), runsprojectSpendAttribution→ rollup events (source event time, per-provider token pools) →buildSpendRollups→SpendRollupStore.append.ok⇒ the tick appends nothing (attribution's sourceStatus contract — suppression, never fabrication). A window is labelled complete only when the intersection of the three ok coverage windows covers it whole. Re-ticks are skipped-identical no-ops under the store's immutability rules.test/spend-ingestion-18127.test.ts: gate, default-off (no reads), missing-export, failure-document, stale, not-ok coverage, happy path against the real store (week complete / month partial, folded child sessions, re-tick no-op), unattributed scope.Docs:
COST-ANOMALY.mdrecords ingestion as landed and updates the Still-needed section (#4825 stays open for the census producers + operator opt-in).Verification
Remote dispatch on the exact head (fleet-run, developing-today/fleet):
bun install+ the new ingestion suite + the cost-anomaly/spend suites +bunx tsc --noEmitinpm-stack/aggregator, andnode --testfor the exporter — run id and conclusion recorded on #18127 before merge. CI is not a gate; the merge decision is the full-diff read against #18127's acceptance criteria.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.