feat: add native subscription authority#18
Conversation
|
P1 remediation pushed in 803983c. Closed the independent-review findings across owner-scoped concurrency/replay, configuration-driven direct and SET ROLE runtime boundaries, migration catalog attestation and rollback/drift/RLS/immutability coverage, sensitive-field enforcement before canonical signing/persistence, and portable NodeNext declarations with a packed-consumer test. Verification: 380 pass / 0 fail in the isolated full unit suite; 16 pass / 0 fail against PostgreSQL 17; typecheck, legacy compatibility, build, no-cloud scan, contract examples, vendor-kit, repo conformance, and packed consumer all pass. Staged gitleaks scan: no leaks. The PR remains draft and the Todos task remains in progress for review B and re-review. |
|
Review-B P1 remediation pushed at exact head The native PostgreSQL 17 migrator now fails closed against a canonical live-catalog manifest even when Regression evidence:
Adversarial self-review found and closed a collation-attestation omission before this commit. No open P0/P1 remains in the implementation self-review. PR remains draft and the owning task remains in progress pending two fresh post-fix reviewers; no merge, publish, release, or deployment was performed. |
|
Review-D P1 remediation pushed at exact head Root cause: the legacy read ordered by The corrective contract adds schema migration v4 with a database-assigned Verification:
Adversarial self-review found no P0/P1. PR remains draft and task remains in progress pending two fresh independent exact-head reviewers. No merge, publish, release, or deployment was performed. |
|
Exact-head P1 ledger remediation pushed at d685d9f. Public validation now recomputes canonical request, lineage, operation, reservation, grant, and deterministic maintenance-use bindings; consume revalidates the stored grant and compares the complete receipt/grant binding before INSERT; timestamps at or before the Unix epoch fail before transaction open. Regression proof: focused 8/8 (106 assertions), clean full 397/0, PostgreSQL 17 live 22/22, typecheck/compat/build/packed NodeNext/no-cloud/contracts/conformance all pass, staged and origin/main..HEAD gitleaks clean. Adversarial self-review P0=0/P1=0; descriptor/schema/catalog/migration attestations unchanged. No merge, publish, release, or deploy. |
|
Exact-head P1 implementation: c473f0b Fix: signed-envelope canonicalization now permits a wire-valid 64-byte canonical base64url Ed25519 signature only at the exact top-level signature path for the exact known schema_version. Generic canonicalJson and every ordinary field retain the existing credential/secret scanner. Covered online-generation receipts, capability-use consume receipts, maintenance grants, Infinity HELD receipts, maintenance consume receipts, and PostgreSQL evidence validation/digests. Regression matrix: sk-, sk_, rk-, rk_, pk-, pk_, token-, token_, secret-, secret_. Each forged wire-valid signature reaches cryptographic FORBIDDEN instead of scanner VALIDATION_FAILED; an ordinary issuer collision remains VALIDATION_FAILED. Verification at this head:
Independent exact-head adversarial review is being coordinated separately; no merge, publish, or deploy performed. |
Summary
@hasna/accounts/native-subscriptionpackage boundary for Infinity and AuthCapsuleValidation
bun test src/native-subscription— 53 pass, 0 fail; repeated five timesbun test— 376 pass, 15 platform/PostgreSQL-gated skips, 0 failbun run typecheck— passbun run build— passbun run test:compat— passshield review— cleanReview focus
Please review closed-schema/signature canonicalization, credential-free boundaries, HELD/drain maintenance authority, SERIALIZABLE/RLS/advisory-lock CAS races, migration idempotency/rollback, and the additive package export.
Residual validation boundary
No live PostgreSQL or provider call was performed in this task. Existing PostgreSQL integration tests remain environment-gated.
Todos:
e802534a-28a3-4750-af19-5f5e1889a341