GeezerVison is showing github.com — aggregator: Phase 1 of #2576 — validate.ts primitives, the ingest contract in the README, and the malformed-input probe matrix · Issue #2577 · developing-today/code
aggregator: Phase 1 of #2576 — validate.ts primitives, the ingest contract in the README, and the malformed-input probe matrix #2577DescriptionPhase 1 of design #2576 (aggregator ingest, fail-closed). Design doc: files/designs/code-aggregator-ingest-contract.md in the keep-the-four-repos-healthy goal workspace. Audited against origin/main 7c52ced1.
Scope
- Create
pm-stack/aggregator/src/validate.ts — the shared validation primitives, no new dependency:
- Write the ingest contract into
pm-stack/aggregator/README.md: validate once at the boundary (shape, element types, ranges, real dates); the three sanctioned failure outcomes (reject-and-retain / drop-the-element-and-count / refuse-the-append); the three forbidden outcomes (throw discarding siblings, fabricate rows/ids/zeros, publish out-of-range as live). Cite src/token-adapter.ts (feat(quota-plane): browser-token adapter framework — managed credentials, fail-closed dashboard-API clients #1153) as the contract's existing embodiment.
- A malformed-input probe matrix in
pm-stack/aggregator/test/ (following the existing per-file test layout): one table per primitive — impossible dates, non-finite numbers, negative counts, over-limit percents, null/string/array element confusion — including the real fixture shapes from src/sources/fixtures.ts as must-pass cases.
- Proof consumer only: convert
isFleetFeed's generatedAt check (src/feed.ts:207-219) to the strict date primitive. No other consumer changes in this phase.
Acceptance criteria
validate.ts exports the primitives above, each covered by the probe matrix (impossible dates fail; a genuine 0 passes as 0).
- README states the contract, the sanctioned outcomes, and the forbidden outcomes.
isFleetFeed rejects 2026-02-30 / 2026-13-01 generatedAt values it previously accepted; all existing feed tests still pass.
- No new dependency in
pm-stack/aggregator/package.json.
- Verification runs in CI per fleet policy (no builds on the sandbox).
🤖 Design-architect pass 18 — agent note: phase of design #2576; the decisions are recorded there and in the design doc. Do not re-derive them in triage; flag genuine blockers on #2576 instead. Activitydezren39 commented on Oct 30, 2026 🤖 agent-note:v1 — design-architect pass 18 (2026-10-30): Phase 1 of design #2576. Scope and acceptance are in the body; the contract and decisions are recorded on #2576 and in files/designs/code-aggregator-ingest-contract.md (keep-the-four-repos-healthy goal workspace). Triage: confirm scope against current main, settle what triage can settle, enqueue the implementation follow-up with acceptance intact. Do not implement in the triage task. dezren39 commented on Oct 31, 2026 dezren39 commented on Oct 31, 2026 🤖 Agent note · handed off (duplicate-PR correction)
dezren39 commented on Oct 31, 2026
🤖 Agent note · done (fix merged)
- Agent: queue worker (repo-worker-code), lane B shift
- Session / ID: queue task 4004
- Found via: queue claim (resume)
- Task: aggregator Phase 1 of design(aggregator): ingest, fail-closed — one validation contract for every document the PM stack consumes #2576 (aggregator: Phase 1 of #2576 — validate.ts primitives, the ingest contract in the README, and the malformed-input probe matrix #2577) — canonical PR aggregator: validate.ts ingest primitives + contract + probe matrix (#2577) #3014 merged (
27940ab3e943325914fa63286d9b448bc4e9aac0); closing this issue on the merge (acceptance met; design(aggregator): ingest, fail-closed — one validation contract for every document the PM stack consumes #2576 stays open for Phases 2–3). Note: PR aggregator: validate.ts ingest primitives + contract + probe matrix — #2576 Phase 1 (#2577) #3017, opened from this task's earlier claim, was a duplicate of aggregator: validate.ts ingest primitives + contract + probe matrix (#2577) #3014 and was closed by lane A under the duplicate-PR protocol with a salvage note on aggregator: validate.ts ingest primitives + contract + probe matrix (#2577) #3014 — nothing unique was lost.
- Verification (first-hand this shift): Codex review completed on head daff047 with zero findings and 0 unresolved threads; diff is exactly the four in-scope files (validate.ts, feed.ts generatedAt conversion, README contract, test/validate.test.ts); laptop
bun test test/validate.test.ts test/feed.test.ts — 97 pass / 0 fail. bunx tsc --noEmit shows 5 errors, all in files this PR does not touch (src/pages.ts, test/overview.test.ts, test/quota-current.test.ts) — pre-existing.
- CI note: no CI workflow ran for this path on the branch (only the fleet-wide jules-daily noise). Merged under the standing merge directive on laptop verification + clean Codex; fix forward if post-merge CI surfaces anything in this change.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|