test(aggregator): prove historical policy input - #1914
Conversation
|
Scope checkThis PR changes 579 lines across 3 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 51e8cd5 | Jul 10 2026, 01:40 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 51e8cd5 | Jul 10 2026, 01:37 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 51e8cd5 | Jul 10 2026, 01:37 PM |
There was a problem hiding this comment.
This PR is a clean, well-scoped W0.6 feasibility spike: it proves that com.atproto.sync.subscribeRepos commit frames contain enough signed, event-specific material (commit CID, CAR/MST proof, record CID, rev, seq/op index) for the aggregator to recover intermediate profile values after queue delay, reordering, and redelivery. The adapter lives in apps/aggregator/src/history-spike/ and is intentionally not wired into production ingestion, matching the implementation plan’s handoff to W10.1.
I read the diff, the full new files, and traced them against existing aggregator patterns (pds-verify.ts, did-resolver.ts, the @emdash-cms/atproto-test-utils fixtures, and the delegated-release spec). The code is coherent: extraction copies the CAR per operation before enqueue, verification re-checks root CID, block CIDs, commit DID/rev, and record CID via @atcute/repo, recoverOrderedHistory deduplicates by (seq, operationIndex) and rejects conflicting redeliveries, and precedingProfileEvent correctly finds the last matching profile before a release. The tests cover the stated scenarios (strict→relaxed→release→strict, current-record inadequacy, metadata substitution, wrong signing key, delete fail-closed, conflicting redelivery) plus byte-level deduplication.
The documented limitations (delete/non-inclusion proofs, tooBig handling, DID key epochs, relay epochs, multi-relay identity, commit-chain continuity) are explicit in the evidence file, so this does not overclaim production readiness. No AGENTS.md conventions are violated: there is no admin UI, no SQL, no published-package change, and no changeset is needed for a private app prototype.
No blocking issues or needs-fixing findings.
|
Closing this feasibility spike. It is a synthetic external-research prototype rather than a test of current production code. The finding, that the current Jetstream plus current-PDS-read path cannot reconstruct intermediate policy state, remains a Gate 0/W10.1 design constraint. |
What does this PR do?
Completes delegated release service feasibility task
W0.6by proving an event-specific historical input for aggregator policy-at-publication decisions.The prototype shows that Jetstream and delayed current-PDS reads are insufficient, while normal-size
com.atproto.sync.subscribeReposcommit frames retain the signed commit, CAR/MST proof, exact record value, CID, revision, and single-relay ordering needed to recoverstrict -> relaxed -> release -> strictafter queue delay, reordering, and redelivery.The adapter is intentionally isolated from production ingestion. Its evidence records required W10.1 follow-ups for deletes,
tooBig, DID key history, relay epochs, chain continuity, and same-commit semantics.Related to #1908, #1870, and Discussion #1590.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.i18n and a changeset are not applicable: this PR changes a private app prototype, tests, and evidence only.
AI-generated code disclosure
Screenshots / test output
pnpm buildpasses with existing virtual-import and deliberate test-pluginevalwarningspnpm --filter @emdash-cms/aggregator typecheckpassespnpm lintpasses with 0 warnings/errorspnpm lint:json | jq '.diagnostics | length'returns0git diff --checkpassTry this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
feat/delegated-release-service-06-aggregator-history. Updated automatically when the playground redeploys.