Adopt Slugkit incoming posts and boosts #28

Merged
erik merged 3 commits from feat/task-7d22a903-incoming-activity into main 2026-10-27 17:29:03 -05:00
Owner

Summary

Adopt Slugkit incoming posts/boosts from release 79e8f03 / template 0.12.0 while preserving site customizations, signed actor fetching, authentication/CSRF/security headers, and existing comments/engagement.

  • slug-api 1.0.0 / contract 2.2.0; slug-federation 0.1.1; auth retained at 1.0.0, with manifest/lock/runtime metadata aligned.
  • Migrations 027–030, following accountId owner attribution, referenced account/contact protections.
  • Authenticated non-consuming per-account incoming GET and explicit atomic retry-safe JSON DELETE; stable post/boost attribution, deduplication aliases/cursors, no history fetch or automatic expiry.
  • Reproducible two-copy offline migration rehearsal and isolated restored-data local dev, guarded before startup migrations against raw/unprepared/failed or credential-bearing copies.

Actual-data rehearsal

Before source changes, current code at 19ab348 / contract 1.1.0 ran against a separate isolated copy: 133 sources, 91 contacts, 515 accounts, 2 following records; legacy owner mappings passed. Multiple subsequent fresh-copy rehearsals applied 027–030, preserved all original tables/accounts and following IDs/snapshots/timestamps/owner mappings, found no ambiguous/missing matches, and passed integrity/FK/idempotence/API workflow checks. Stable migrated-data fingerprints matched across both copies; original snapshot hash unchanged. Migrated localhost dev passed the same counts and new contract/API checks. No private data or credentials are committed. Commands/evidence/limitations: docs/incoming-activity-adoption.md.

Verification

  • Build/typecheck/lint/whitespace passed.
  • Full local suite: 663 tests / 64 files; CI suite: 536 tests / 54 files; browser suite: 40 passed.
  • Local Docker dev build/startup, preparation guard, homepage/metadata and external-network blocking passed. Integration/browser/container tests remain local-only; workflows unchanged.
  • Independent functional review: no issues. Operational P2 fixed and re-reviewed with no remaining findings; final timeout-only delta independently reviewed. Reviews posted below; reviewers did not independently rerun runtime evidence.
  • CI #103 passed for reviewed HEAD 93942b1. Earlier #102 exposed the real CLI test exceeding the default 5-second shared-runner budget; scoped bounded timeouts fixed it without skipping assertions.

Task: task-7d22a903
No production migration/startup/release/deployment is authorized or performed. Production rollout and breaking-client adoption remain separate operator decisions.

## Summary Adopt Slugkit incoming posts/boosts from release 79e8f03 / template 0.12.0 while preserving site customizations, signed actor fetching, authentication/CSRF/security headers, and existing comments/engagement. - slug-api 1.0.0 / contract 2.2.0; slug-federation 0.1.1; auth retained at 1.0.0, with manifest/lock/runtime metadata aligned. - Migrations 027–030, following accountId owner attribution, referenced account/contact protections. - Authenticated non-consuming per-account incoming GET and explicit atomic retry-safe JSON DELETE; stable post/boost attribution, deduplication aliases/cursors, no history fetch or automatic expiry. - Reproducible two-copy offline migration rehearsal and isolated restored-data local dev, guarded before startup migrations against raw/unprepared/failed or credential-bearing copies. ## Actual-data rehearsal Before source changes, current code at 19ab348 / contract 1.1.0 ran against a separate isolated copy: 133 sources, 91 contacts, 515 accounts, 2 following records; legacy owner mappings passed. Multiple subsequent fresh-copy rehearsals applied 027–030, preserved all original tables/accounts and following IDs/snapshots/timestamps/owner mappings, found no ambiguous/missing matches, and passed integrity/FK/idempotence/API workflow checks. Stable migrated-data fingerprints matched across both copies; original snapshot hash unchanged. Migrated localhost dev passed the same counts and new contract/API checks. No private data or credentials are committed. Commands/evidence/limitations: docs/incoming-activity-adoption.md. ## Verification - Build/typecheck/lint/whitespace passed. - Full local suite: 663 tests / 64 files; CI suite: 536 tests / 54 files; browser suite: 40 passed. - Local Docker dev build/startup, preparation guard, homepage/metadata and external-network blocking passed. Integration/browser/container tests remain local-only; workflows unchanged. - Independent functional review: no issues. Operational P2 fixed and re-reviewed with no remaining findings; final timeout-only delta independently reviewed. Reviews posted below; reviewers did not independently rerun runtime evidence. - CI #103 passed for reviewed HEAD 93942b1. Earlier #102 exposed the real CLI test exceeding the default 5-second shared-runner budget; scoped bounded timeouts fixed it without skipping assertions. Task: task-7d22a903 No production migration/startup/release/deployment is authorized or performed. Production rollout and breaking-client adoption remain separate operator decisions.
feat: adopt incoming activity with restored-data rehearsal
All checks were successful
CI / build-lint-test (push) Successful in 50s
c09fb95059
fix: guard dev startup against unprepared databases
Some checks failed
CI / build-lint-test (push) Failing after 49s
6d4bafe3f3
Author
Owner

Independent review — no remaining findings

Two fresh, read-only Pi reviewer sessions assessed this PR:

  • Functional adoption at c09fb95: no actionable security/correctness issues found. Scope included account identity/ownership protections, migrations 027–030, incoming services/API/inbox handling, metadata, retained deduplication/cursors, signed-fetch preservation, and relevant regressions against pinned Slugkit 79e8f03. These functional files are unchanged by the subsequent fix.
  • Operational/rehearsal re-review at 6d4bafe: no issues found; prior P2 resolved. Compose now runs the fail-closed database guard before app startup/migrations. Preparation writes its completion marker only after sanitation and verification. The guard checks private permissions, localhost origin, source-hash mismatch and copied production credential fingerprints, while allowing new local credentials. Synthetic tests cover raw, failed-preparation, swapped-source and credential-reintroduction cases. Stable migrated-row fingerprints strengthen the repeated-copy evidence.

Verification limits: independent static reviews and whitespace check, not independent reruns of the reported tests/runtime evidence. Reviewers did not access private snapshots, production, containers or network, or mutate repository state. Full local checks and actual-data rehearsals were executed by the implementation agent as described in the PR and adoption document. No production migration/deployment has occurred.

## Independent review — no remaining findings Two fresh, read-only Pi reviewer sessions assessed this PR: - **Functional adoption at c09fb95:** no actionable security/correctness issues found. Scope included account identity/ownership protections, migrations 027–030, incoming services/API/inbox handling, metadata, retained deduplication/cursors, signed-fetch preservation, and relevant regressions against pinned Slugkit 79e8f03. These functional files are unchanged by the subsequent fix. - **Operational/rehearsal re-review at 6d4bafe:** no issues found; prior P2 resolved. Compose now runs the fail-closed database guard before app startup/migrations. Preparation writes its completion marker only after sanitation and verification. The guard checks private permissions, localhost origin, source-hash mismatch and copied production credential fingerprints, while allowing new local credentials. Synthetic tests cover raw, failed-preparation, swapped-source and credential-reintroduction cases. Stable migrated-row fingerprints strengthen the repeated-copy evidence. Verification limits: independent static reviews and whitespace check, not independent reruns of the reported tests/runtime evidence. Reviewers did not access private snapshots, production, containers or network, or mutate repository state. Full local checks and actual-data rehearsals were executed by the implementation agent as described in the PR and adoption document. No production migration/deployment has occurred.
test: bound rehearsal CLI time on slower runners
All checks were successful
CI / build-lint-test (push) Successful in 50s
93942b1fe7
Author
Owner

No issues found in 6d4bafe..93942b1; prior review remains valid.

Only src/db/__tests__/migration-rehearsal.test.ts changed. All tests and assertions remain intact. The scoped 30-second timeout and 20/10-second child-process timeouts are reasonable; child timeouts still fail the existing exit-status assertions. Runtime and migration scripts are unchanged.

Static delta review only; reported passing checks were not rerun. No network, private data, edits, or Git mutations.

No issues found in `6d4bafe..93942b1`; prior review remains valid. Only `src/db/__tests__/migration-rehearsal.test.ts` changed. All tests and assertions remain intact. The scoped 30-second timeout and 20/10-second child-process timeouts are reasonable; child timeouts still fail the existing exit-status assertions. Runtime and migration scripts are unchanged. Static delta review only; reported passing checks were not rerun. No network, private data, edits, or Git mutations.
Author
Owner

Final verification update: CI run #103 passed for reviewed HEAD 93942b1fe7. The earlier #102 failure was the real CLI rehearsal test exceeding Vitest’s default 5 seconds on the shared runner; a scoped 30-second budget plus bounded child-process timeouts fixed it without skipping assertions. Local checks: build/type/lint, 663 full tests, 536 CI tests, 40 browser tests. Actual-data rehearsal repeated with matching stable row fingerprints; production snapshot unchanged. All review findings resolved. No production migration/deployment.

Final verification update: CI run #103 passed for reviewed HEAD 93942b1fe7. The earlier #102 failure was the real CLI rehearsal test exceeding Vitest’s default 5 seconds on the shared runner; a scoped 30-second budget plus bounded child-process timeouts fixed it without skipping assertions. Local checks: build/type/lint, 663 full tests, 536 CI tests, 40 browser tests. Actual-data rehearsal repeated with matching stable row fingerprints; production snapshot unchanged. All review findings resolved. No production migration/deployment.
erik merged commit dc0ede5ce5 into main 2026-10-27 17:29:03 -05:00
erik deleted branch feat/task-7d22a903-incoming-activity 2026-10-27 17:29:03 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/erikvancraddock.com!28
No description provided.