Skip to content

aggregator: Phase 1 of #2576 — validate.ts primitives, the ingest contract in the README, and the malformed-input probe matrix #2577

Closed

Description

@dezren39

Phase 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

  1. Create pm-stack/aggregator/src/validate.ts — the shared validation primitives, no new dependency:
  2. 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.
  3. 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.
  4. 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.

Activity

  1. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    effort/mMedium: expected under 1 day of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Oct 30, 2026
  2. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 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.

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 30, 2026
  4. 23 remaining items

  5. added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 31, 2026
  6. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  7. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off (duplicate-PR correction)

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  9. added a commit that references this issue on Oct 31, 2026
  10. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (fix merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/mMedium: expected under 1 day of workpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions