Skip to content

id(didit): schema types + pure evaluator in pkgs/id/src/didit/ (Phase 1 of #2031) #3788

Closed

Description

@dezren39

Phase 1 of the first ID app set tracked by issue #2031. Design record: the task 5727 triage comment on issue #2031; schema source: doc/2026-10-29T13-04-50Z_investigation_didit_tracker_data_model/ on main (from issue #2029).

Build, library-only:

  • pkgs/id/src/didit/ implementing the four kinds of decision D0 — didit.entity, didit.record, didit.expectation, didit.opinion — as CBOR body types per the doc §3 sketch, on the existing free-string ChainExt.kind (pkgs/id/src/chain.rs:97-100).
  • A pure evaluator (no stored due state): expectations evaluate against records; windows evaluate in the expectation's IANA tz; subjects: [] is invalid (explicit entity IDs only).

Acceptance:

  • The doc §8 golden tests pass, including the five worked examples of doc §4 (fed-twice-daily; outside every 2–4h during waking hours; one-vs-both walk with divergent per-entity details; non-metric water record; later opinion as a separate linked event, original never mutated).
  • No app/UI code; no change to shipped behavior outside the new module.

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 1, 2026
  2. developing-today commented on Nov 1, 2026

    @developing-today
    Contributor
  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  6. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · blocked (packet defect)

  8. 48 remaining items

  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked (triage verdict: live, PR red, precise remainder)

    Evidence (fresh, 2026-11-03 ~17:00Z)

    cargo test -p id --lib didit against PR #4950's exact head ba33be156, in a clean worktree off the PR branch with a warm id target directory:

    test result: FAILED. 9 passed; 3 failed; 1971 filtered out
    failures:
      didit::tests::worked_example_fed_twice_a_day
      didit::tests::worked_example_one_vs_both_walk_with_divergent_detail
      didit::tests::worked_example_outside_every_two_to_four_hours
    

    The tree compiles; three of the five design golden tests are red.

    Root causes

    1. Period::Day under an Always active window. Always carries no IANA zone, so expectation_tz falls back to UTC (eval.rs), and the Chicago fixtures land in different UTC days — the verdict lists come back empty (left: 0, right: 2). The design's own §4(a) sketch avoids this by anchoring the period explicitly ({anchor, length_seconds}), so the tests should do the same. Period::Custom already exists and is re-exported.
    2. The design's §4(b) example is arithmetically wrong. Records at 07:05, 09:30, 12:10, 16:45, 21:00 contain two over-max gaps, not one: 12:10→16:45 is 4h35m (16500 s) and 16:45→21:00 is 4h15m (15300 s). The doc names only the second. The evaluator correctly reports the first (16500 s), so the test's expectation of 15300 s is wrong.

    What is preserved (do not restart from scratch)

    • ~/git/fleet/8531 on branch verify/8531-didit, commit 8b4c728, pushed.
    • It contains the abandoned working-tree fix from ~/git/fleet/5774 (which was never committed): explicit Period::Custom anchors in the fed and walk tests, plus the 16500 s gap expectation with a comment recording the design inconsistency.
    • With that commit, two of the three failures pass; one remains.

    Exact remainder

    worked_example_outside_every_two_to_four_hours still fails at its second half: the "satisfied" variant keeps the 16:45 record, so the 16500 s gap survives and the assert all(Satisfied) cannot hold. A genuinely satisfied series needs every consecutive gap inside 7_200..=14_400 and the final now − last < 7_200, e.g. records at 07:05, 09:30, 12:10, 14:30, 16:45, 19:00, 21:00 with now = 22:30.

    Then: cargo test -p id --lib didit → push to queue/5774-3788-didit-schema-evaluator → merge PR #4950 (the merge queue runs the required basic: proxy port fallbacks; Closes #3788 closes the issue).

    Why this is not already merged

    pkgs/id has no PR-tier CI: .github/workflows/id-check.yml triggers only on push: main, schedule and workflow_dispatch (the repo-wide "no PR triggers" change, 285e425b7 on 2026-11-02). PR #4950's only checks are basic: production line limit (pass) and non-gating review bots, so merging it as-is would have put an uncompiled, test-failing module on main. That is why local verification was the gate here.

    Queue disposition

    Task 8531 parked 20 minutes; labels moved to queue/parked + status/parked. No new implementation packet was enqueued: the work is one fixture repair on an existing pushed branch, not a new scope.

  10. added
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  11. added a commit that references this issue on Nov 3, 2026
  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    • Agent: repo-worker-code, lane code-j (direct execution lane)
    • Task: task 8531 (triage) — completed as fixed_merged, resuming the recorded checkpoint rather than restarting.
    • What happened: PR feat(id): didit schema types and pure evaluator (#3788) #4950 (this issue's implementation, from queue task 5774) had never been compiled — id-check.yml has no pull_request trigger by repo policy — and its didit golden tests failed 9 pass / 3 fail against the PR head. The prior lane's verify branch (verify/8531-didit @8b4c728) already carried the period-anchor fixes; this run added the last one (5752237): the satisfied variant of worked_example_outside_every_two_to_four_hours now uses a record set whose every consecutive gap is inside 7200..=14400 (14:30 and 19:00 inserted), since moving only the last record left the 16500s 12:10→16:45 gap in place. Both test commits were pushed onto PR feat(id): didit schema types and pure evaluator (#3788) #4950's branch.
    • Verification: laptop cargo test -p id --lib didit (from pkgs/id, job-limited under high laptop load) — 12 passed, 0 failed. PR feat(id): didit schema types and pure evaluator (#3788) #4950 merged (merge commit bc74d10); this issue auto-closed via the PR's Closes #3788. Codex review could not run (usage limits, zero findings posted) — disposition recorded on PR feat(id): didit schema types and pure evaluator (#3788) #4950 (comment 6610945972).
    • Labels: claim labels removed at this terminal state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)source/creatorFiled by the new-issue-creator 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