Repository navigation
feat(vault): record a registry handle by hand - #487
Merged
Merged
Conversation
This was referenced Oct 20, 2026
LKSNDRTMLKV
force-pushed
the
feat/registry-recovery-and-typed-outcomes
branch
from
October 20, 2026 22:32
470295e to
8165020
Compare
LKSNDRTMLKV
force-pushed
the
feat/registry-record-handle
branch
from
October 20, 2026 22:32
be6483e to
1420f86
Compare
Signed-off-by: chillin_since_26 <aleksandar.temelkov@live.com>
Signed-off-by: chillin_since_26 <aleksandar.temelkov@live.com>
LKSNDRTMLKV
marked this pull request as ready for review
November 4, 2026 01:21
Member
Author
|
@coderabbitai review |
Action not completed
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
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. |
LKSNDRTMLKV
changed the base branch from
feat/registry-recovery-and-typed-outcomes
to
main
November 4, 2026 15:23
8 tasks done
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.
Summary
A registration the drain cannot settle by itself stays
submittedand waits for a person, and until now it said nothing about why and nothing could settle it. This makes the row say why, and adds the one write that settles it:POST /vault/api/v1/dpp/{dppId}/registry/handle, withodal registry handle <passport-id> <correlation-id>.Stacked on #484 (base
feat/registry-recovery-and-typed-outcomes). It usesconfirm_submissionandSubmissionConfirmationfrom odal-node/dpp-core#490, released indpp-core0.23.0. Brought up to date on 2026-11-04: it took #484's branch, which now carriesmainand the published 0.23.0, so it builds against crates.io and needs no local core. Its migration is renumbered from0043to0045, becausemaintook0043and0044in the meantime; an unreleased migration has been applied nowhere, so the rename is safe. The runbook paragraph it rewrites had moved under Monitoring (#515) and gained #484's lone-candidate case, so the change was made there, and the outbox test double #561 added learned the two new methods.Related issue
Closes #485. (GitHub closes it when this reaches
main, not while it is stacked.)Changes
The row says why.
messageon asubmittedrow now holds the reason it is waiting: the candidates of an ambiguous lookup, that the handle was not found and whether all of the task list was read, that the adapter cannot look a submission up, that the row's payload cannot say what was submitted, or a submission state this node has no name for.GET /vault/api/v1/dpp/{dppId}/registryshows it. A new outbox method,mark_submitted_noting, backs the row off and counts the attempt exactly asmark_submitteddoes and keeps the message;mark_submittedstill clears it, so a row that moves on stops carrying a reason that no longer applies.A person can record the handle.
POST /vault/api/v1/dpp/{dppId}/registry/handle, admin scope, body{ "correlationId": "…" }.confirm_submission, and the request is refused with422unless that submission reports the unique product identifier this passport was submitted under. The detail says what the registry did show: other passports' identifiers, none, a submission still being checked, no such handle among the tasks read, or an adapter that cannot read a submission.record_handleis a singleUPDATE … WHERE status = 'submitted' AND registry_id IS NULL/'', so the check and the write cannot be pulled apart by another writer. A handle the registry gave is never overwritten (409), a row already ruled on is not touched (409), and a row the registry has not accepted yet has no handle to record (409).200withrecorded: falsethat changes nothing, asks the registry nothing and writes the trail nothing, so a retry after a lost response does not fail on its own success. A different handle is a409. So it is not in the idempotency policy table, and the route documents why.registry_handle_recorded, with who recorded which handle and what the registry reported. Migration0045widens the audit actionCHECK; no table, grant or hash-chain change.odal registry handle <passport-id> <correlation-id>.odal registry [id]keeps its old form (args_conflicts_with_subcommands), and a test pins that, because the runbook and the row messages name it.The registry adapter implements
confirm_submission: it finds the one task the handle names, and for a finished one compares the identifiers its result reports with the one the passport was submitted under. It reads one result, not every result in the list.Docs. The API description (path, request, response and
SubmissionReportschemas, bundles regenerated), the runbook paragraph that said there was no node-side way to do this, andCHANGELOG.md. The "no way to record a handle by hand" item in #484's second-opinion list is now this PR.Decisions I would like a second opinion on
501for a node with no registry queues, and502for an unreadable registry.501is the precedent the ruleset route sets for a feature that is absent;502because the registry is an upstream, and the request is safe to retry. The501has no integration test, because every harness wires the queues; a unit test pins the status of every refusal.Checklist
record_handleonly on asubmittedrow with no handle, the whole way from "needs a person" to registered, the reason kept and cleared), the route over HTTP (recorded and audited, replay, every unconfirmed answer leaves the row and the trail untouched,404/409/422told apart, a held handle never overwritten, a502, admin only, malformed identifiers), and the CLIjust lintpasses locallyjust fmtappliedjust checkexits 0 against the publisheddpp-core0.23.0 (1682 tests), and the Docker suites it touches pass: the DAL registry and state-change suites (31), the handle route (9), and the outbox, OpenAPI contract and operator-path suites (54), which upgrade the v0.14.0 and v0.15.0 fixtures through migration0045.just openapi-checkpasses and the bundle regenerates unchanged. The handle route test published under a VAT number, which chore!: repin dpp-core 0.23.0 #561 now refuses, and publishes under an LEI (98c84bc9)println!/eprintln!/dbg!in service-cratesrc/.envfiles in the diff0045widens the audit actionCHECKonly; no table or grant changes