Skip to content

feat(pm-stack): agg_identity_sessions P1 contract for #1744 Move 1 step 2 - #17045

Merged
developing-today-fleet[bot] merged 7 commits into
mainfrom
felix/1744-agg-identity-registry
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 7 commits into
mainfrom
felix/1744-agg-identity-registry

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Lane 0640-HN (Felix, 2026-11-29). The last remaining P1 schema contract for #1744, in the established pattern (1452-E: #16975/#16978; 1522-F: #16983; 1607-I: #17003, #17008, #17009; 0640-HN: #17042).

What: P1 schema contract for the identity-registry group — the aggregator's session identity registry (deployed as identity-registry.json; store contract in aggregator/src/registry.ts, record shape SessionRecord in aggregator/src/model.ts, merge in aggregator/src/sources/live.ts) → public.agg_identity_sessions as migration 20261129_0008_agg_identity_registry: paired up/down (down refuses non-empty), Turso golden generated by the repo translator, both migration test suites extended (2 new Turso constraint tests; PG suite section mirroring the coverage section), README + migration plan updated. With this and #17042 (feed), every agg_* group named in the shared-schema map carries a vetted contract.

Contract notes: identity is the (source, id) pair the merge keys on, so that pair is the primary key. The reader's gates become checks where the database can state them: the source list is the RegistrySource type (session sources plus cron), provenance is the RegistryProvenance pair and stays nullable (pre-migration records carry none), tokens_total is finite and non-negative when present. parent_id is deliberately not a foreign key — the registry is loose v1 by design and a record's parent may never land in the registry. Task refs ride as a text[] under the seen-ids precedent (20261116_0001); ref validity (parseRef) stays a validator rule. Records merge in place and are never deleted (the durable identity history outlives the feed attention window), so grants are SELECT/INSERT/UPDATE with no DELETE.

Schema-only: no rows copied, no writer/reader cutover; the registry file remains the live backend and rollback target; #1744 criterion 3 untouched.

Merge note for Felix: this branch is independent of #17042 (feed, migration 0007) off a slightly newer main; the README/plan/test-migration.sh hunks sit adjacent to #17042's, so whichever merges second needs a small rebase (in test-migration.sh this branch's vars are pre-named up11/down11 for that). After both land, the two "remaining contract" sentences (each naming the other group) want a one-line reconciliation.

Verification: full test_turso_migrations.py suite run against this exact tree = 58 tests OK (56 at base + 2 new registry tests; golden pin for 0008; all pre-existing goldens byte-identical). test-migration.sh bash-syntax checked; its disposable-PostgreSQL run is CI's leg, as with prior slices. A remote fleet-command verification run against this branch is dispatched alongside this PR; its verdict will be posted on #1744.

Refs #1744

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-30T02:01:50Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 71384506-7b98-4760-8617-1b8928fc7ecc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Remote verification (run 46338415806, job log read firsthand): Turso suite Ran 58 tests / OK. PG leg void in the executor venue (no docker inside the container; test-migration.sh exited at its guard) — CI leg, as with prior slices. Merge-ready for Felix.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Agent note · lane 0640-IE (Felix) — claiming the PR #17045 rebase.

PR #17042 (the sibling #1744 feed contract) has merged, leaving this PR CONFLICTING on the adjacent README/plan/test-migration.sh hunks, exactly as 0640-HN's merger note predicted. I will rebase felix/1744-agg-identity-registry onto current origin/main, resolve only those adjacent hunks, re-run the Turso migration suite remotely at the rebased head, and force-push with lease (own PR branch). No content changes beyond conflict resolution. Felix merges.

@developing-today-fleet
developing-today-fleet Bot force-pushed the felix/1744-agg-identity-registry branch from f15dc72 to f0e7b28 Compare November 30, 2026 02:24
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Agent note · lane 0640-IE (Felix) — PR #17045 REBASED onto current main and re-verified; merge-ready for Felix.

  • Rebase: felix/1744-agg-identity-registry f15dc72 → f0e7b28 (force-with-lease; done in a detached worktree because HN's worktree still holds the branch checkout). Conflicts were exactly the predicted adjacent hunks, resolved as unions/reconciliations with no content loss:
    • test_turso_migrations.py — feed tests (from merged PR feat(pm-stack): agg_feed P1 contract for #1744 Move 1 step 3 #17042) and identity tests both kept.
    • test-migration.sh — up10/down10 (feed) and up11/down11 (identity) both kept, feed applied before identity; both test sections kept.
    • shared-schema/README.md — both migration sections kept; the two "remaining contract" sentences reconciled: neither group remains, so the text now reads that the contracts do not complete P1 / Move 1 or land Move 2, criterion 3 unchecked (the one-line reconciliation HN's merger note flagged).
    • SHARED-SCHEMA-MIGRATION-PLAN.md — same reconciliation: every agg_* group in the map now carries a vetted P1 contract.
    • Verified post-rebase: git diff --name-only --diff-filter=U empty, zero conflict markers, final diff vs origin/main = the PR's original 7 files only.
  • Verification at the rebased head: seat-side suite Ran 60 tests / OK (56 base + 2 feed + 2 identity — the union runs together); remote fleet-command run 46340766010 (developing-today/fleet, job log read firsthand): conclusion success, suite result OK. PG leg void in the executor venue as with all prior slices (no docker) — CI's leg.
  • Priority validation: pm stack: centralize all service data as shared tables in one database schema #1744 priority/high concurred (unchanged).

@developing-today-fleet
developing-today-fleet Bot merged commit 15c68cd into main Nov 30, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/1744-agg-identity-registry branch November 30, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants