Repository navigation
feat: the install step, verified by the authority's step verifier - #80
Open
antoinetoussaint-byte wants to merge 3 commits into
Open
antoinetoussaint-byte wants to merge 3 commits into
antoinetoussaint-byte wants to merge 3 commits into
Conversation
The host delivers a pending installation's setup to POST /_codefly/installations, as its existing gateway delivery does. The runtime served nothing there since e80369a deleted the saas-mode handler, which trusted a parsed carrier, acknowledged a nil step and let the step act under the carried capability. Now the authority verifies the step: the runtime asks Check at exactly POST /_codefly/installations, which the authority routes to its dedicated installation-step verifier, never advisory. The body and the installation carriers must name exactly the organization, installation and revision verified, with a consent receipt and only installations:install on that installation. The step receives those facts (Installation, now with Receipt) and no Gateway; a solution with no OnInstall is answered 409, never 204. One (installation, revision, receipt) runs once per process, and a repeat is verified before a remembered acknowledgement answers it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… 409 generically
Agreed with Authority10882 and Root10879:
- The body is exactly {installation_id, organization_id, revision}. A scope, or
any other member, is refused 400; the step credential verifies nothing else.
- A refusal answered beside the verified context is a refusal, since this check is
never advisory.
- Unauthenticated joins PermissionDenied/InvalidArgument/NotFound as 409, with one
generic reason. The authority's own reason is logged and never crosses into the
host's job history. Cancelled and timed-out calls stay 503.
- Installation.Receipt is renamed OperationID: the verified task id is the consent
operation, not the whole receipt, whose intent, generation and digest the
authority checks.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…step handoff Authority's installation-step source and its maintained generation are pushed at codefly-dev/authority 21ce6d9 (tree 86e128ec). The installation-step receiver checks setup steps through AuthorityService.Check at the reserved POST /_codefly/installations method; this selects the generated client that documents that reserved Check, so the runtime builds against the client generated from the source it is qualified with. No new RPC or field is used, and hop stays at its existing pin. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
antoinetoussaint-byte
marked this pull request as ready for review
October 29, 2026 10:17
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.
The solution-side receiver for a pending installation's setup. It runs on the existing listener and is verified only by the Authority's dedicated installation-step verifier. Full evidence:
.lazybox/artifacts/installation-receiver/report.mdin the runtime73 worktree.What
Request.
POST /_codefly/installationsis SaaS's existing delivery path and Authority'sInstallationStepHTTPMethod.x-codefly-work-context.{installation_id, organization_id, revision}. Ascopeor any other member is refused 400.x-codefly-installation-idand-revisionmust equal the body.Verification. The runtime calls
AuthorityService.Checkat that exact method, with its own delivered principal as the audience and never in advisory mode. Before the step runs or any cached ack is answered, the verified context must match:It must also have a non-empty
task_id, no actor chain, and the sole scopeinstallations:install:[id].The step.
OnInstall(func(ctx, Installation) error)getsInstallation{ID, OrganizationID, Revision, OperationID}and no Gateway. With noOnInstallthe answer is 409, never 204. An explicit no-op acknowledges.Once-ledger. Keyed by (installation, revision, consent operation), per process. It answers only after a fresh successful Check on every request.
Answers.
{reason}, with one generic reason when the authority refused:RefuseInstall;Classification
Fix, at the owner of the behaviour. Authority verifies, and the runtime compares and runs the step. Not revived from the deleted legacy handler: success from a parsed carrier alone, a nil-step acknowledgement, or the step acting under the carried capability.
Reuse
Reused: SaaS's existing delivery path and statuses, the existing
CheckRPC andhostAuthority, and the deleted handler's bounded once-ledger and sanitizer. There is no new RPC, pin or proto change. Not added: a runtime generation slot, since Authority checks generation through its signed binding and current state.Owner contract and qualification
Authority. Authority10882's contract is at
codefly-dev/authority21ce6d9(tree86e128ec), which includes the step verifier and its maintained generation. This PR selectsauthority-client/go v0.1.1-0.20261029092314-21ce6d9284ed, the confirmed coordinate.hopis unchanged.Receiver against Authority's real local plugin at
21ce6d9. Both in process and as theinstallreceiverprocess booted throughServeand reached over HTTP:Paired crossing, SaaS10887, PASS.
TestCanonicalCombinedInstallQueueThroughRuntimecovers native PostgreSQL → combined review/install → SQL claim → AccountsHostAuthorityServer.Check→ this receiver ate6809f5as a process → finish → final transaction:Evidence: runtime73's
.lazybox/artifacts/installation-receiver/HANDOFF.md, and SaaS'sinstall-final-qualification/canonical-queue-receiver-3.log.Docs
README.md("The install step"),AGENTS.mdandCHANGELOG.md.Tests
installation_test.goruns against a stand-in authority. Nine production mutations each turn it red; the list is in the artifact. Out of tree, a scratchgo.workran the receiver against Authority10882's frozen uncommitted candidate, using its real localAuthorityServiceplugin and a realIssueInstallationStep. Results:core.Installactivated, the same credential got 503 (FailedPrecondition), and the cached 204 was not replayed.go test -race ./..., vet and gofmt are green.Not verified
v0.0.17-0.20261029092559-e6809f537977. Product117 consumes it locally before merge.🤖 Generated with Claude Code