Connect claim activation pipeline#383
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
db/migrations/008_claim_activation_pipeline.sqland store only public tenant signer fields plus a TXT package and agent card JSON inputs.managed_namespace/bring_your_own_enssigner data (api/claim/commandlayer-namespace.js), ENS TXT verificationPOST /api/claims/verify-signer-records(api/claims/verify-signer-records.js), claim statusGET /api/claims/status(api/claims/status.js), tenant-proof verificationPOST /api/claims/verify-tenant-proof(api/claims/verify-tenant-proof.js), and an admin idempotent orchestratorPOST /api/admin/run-activation-pipeline(api/admin/run-activation-pipeline.js) that reuses existing pin/genesis handlers.lib/claims/signer-records.jsfor building/resolving/comparing the four required TXT records and wire resolver usage through existing verifier code; expose safe resolver hooks fromlib/verifyReceipt.js.public/claim.htmlnow (a) warns that the private signing key is local and never transmitted, (b) requires download/ack before continuing, (c) submits tenant public signer fields + TXT package + card JSON, and (d) displays a persisted activation pipeline with a "Verify ENS Records" action;public/admin/claims.htmlshows signer identity, TXT package, managed ENS intent and tenant-proof status.Testing
npm test(all tests passed: 137 tests, 0 failures) and addedtests/claim-activation-pipeline.test.jscovering claim submission persistence, ENS record verification, mismatch/missing cases, idempotent orchestration, status model, and tenant-proof signer matching.npm run check:linksand example checkscd examples/webhook-auto-verify && npm run check, both succeeded.--checkduring development; automated tests exercise the new endpoints and helper logic successfully.Files changed (high level):
api/claim/commandlayer-namespace.js,api/claims/verify-signer-records.js,api/claims/status.js,api/claims/verify-tenant-proof.js,api/admin/run-activation-pipeline.js,api/admin/claims.js(small additions),lib/claims/signer-records.js,lib/verifyReceipt.js(exports),public/claim.html,public/admin/claims.html,db/migrations/008_claim_activation_pipeline.sql, andtests/claim-activation-pipeline.test.js.Persisted public signer fields:
activation_mode,tenant_signer_ens,tenant_signer_public_key,tenant_signer_kid,tenant_signer_canonicalization,tenant_signer_record_status,tenant_signer_records_verified_at,tenant_signer_records_network,tenant_signer_verification_error, andtenant_signer_txt_records.Supported activation/status values: signer records:
records_generated,records_pending,records_verified,records_mismatch,records_unavailable; managed ENS publication (prepared for later):not_started,awaiting_payment,ready_for_operator,published,verified,failed; tenant proof:not_submitted,verified,invalid.What became automatic in this PR: an authenticated admin/internal orchestrator can idempotently advance already-paid claims through existing IPFS pinning of public agent cards and genesis receipt generation while avoiding ENS writes.
What remains manual / intentionally deferred: tenant private keys remain local (never stored/transmitted), ENS TXT publication and managed onchain subname creation are deferred and not executed in this PR, and tenant action proof submission remains an operator/tenant-triggered checkpoint (this PR provides verification endpoint and stores the result).
Next PR (exact intent): implement managed subname creation and onchain TXT publication with operator transaction model, parent-ownership/resolver authority checks, gas handling, idempotency and retry/failure recovery logic (this PR only stores the public TXT package and readiness status).
Codex Task