Skip to content

Define issued credential retention contracts and their ownership - #182

Closed
freeqaz-openai wants to merge 23 commits into
feat/github-gateway-runtimefrom
feat/credential-issued-custody-20260915
Closed

freeqaz-openai wants to merge 23 commits into
feat/github-gateway-runtimefrom
feat/credential-issued-custody-20260915

Conversation

@freeqaz-openai

@freeqaz-openai freeqaz-openai commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

A successful mint does not establish durable custody. This PR defines the internal contracts that retain the original issuer result, protected material, State transaction and cleanup obligation until the outcome is known.

  • Require minted material, authenticated encrypted retention and distinct known-COMMIT evidence before exposing a usable credential.
  • Preserve original-owner settlement, keyless cleanup and charged capacity across cancellation and unknown outcomes. Lost acknowledgment cannot authorize reminting or reconstruct live authority from stored metadata.
  • Keep settlement, retention and the source-release obligation in OCC. The controller owns GitHub material loading and custody dependencies; its concrete source lease supplies the material while OCC sees only release.

The compiler fixtures check both owners. All 15 original issuance rejection cases remain, with one added check that the OCC lease cannot expose GitHub signing material. Internal handles remain outside the public OCC entry point.

Validation

The refreshed revision passed 141 local provider, protected-material, HTTP-head and JSON conformance cases, with zero failures or skips. The full workspace TypeScript build and all three compiler fixture projects passed; all 247 negative assertions remain, including the original issuance rejection cases.

Formatting, workspace boundaries, CI suite audit, documentation length/build/link validation, generated OpenAPI/reference and whitespace checks passed. Documentation validation checked 119 pages and 1,435 links. Hosted CI must still validate this refreshed head. No live-provider, installed-runtime or PostgreSQL verification was rerun.

Dependencies and limits

Based on #177, with #175 included as the write-issuer supplier. This is a declaration and compiler-conformance change. The source loader, retained issuance implementation, Work/IAM admission and production Agent caller remain separate integration work; these checks do not establish live-provider or installed behavior.

/** Original protected source owner. Release drains original issuer settlement and
* late finalizers, including failed construction; it never destroys a shared source.
* Closing material or releasing this lease proves neither revocation nor COMMIT. */
export interface ProtectedSourceLease {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably move interfaces into their own file and separate "consumed externally" from an internal interface. What is the boundary our modules need to expose? This change may need to cut across this PR + base ones to align on a shared, clean code setup. If this is already established for the repo, we need to follow that convention. Modules should be "thin and deep" in the API they expose. thin = small API surface; deep = rich functionality.

@freeqaz-openai freeqaz-openai changed the title Define issued credential retention contracts and check them in CI Define internal issued credential retention contracts and check them in CI Sep 15, 2026
@freeqaz-openai freeqaz-openai changed the title Define internal issued credential retention contracts and check them in CI Define issued credential retention contracts and their ownership Sep 16, 2026
@kevinlin-openai

Copy link
Copy Markdown
Collaborator

Please remove the GitHub-specific profile requirement from the shared issued-credential retention contract.

packages/occ/src/credential-gateway-v1/issuance.ts imports TokenProfile from ./github-operations.ts and requires IssuedLeaseIdentity.tokenProfile. That type only permits "repository-read-v1" | "repository-write-v1". As a result, a non-GitHub issuer cannot use this shared lease contract with its own credential profile without adopting a misleading repository profile or changing the shared contract.

IssuedLeaseIdentity already carries the provider-neutral CredentialProfileRef. Please use that admitted profile identity for shared retention and exact-profile matching, and keep GitHub's concrete read/write profile selection and validation under apps/controller/src/providers/token/github/. If another shared field is necessary, make it provider-neutral rather than importing the GitHub operation vocabulary into OCC's retention contract.

This is separate from the GitHub-specific source loader and custody dependencies, which already belong under the GitHub provider directory. #184 inherits this contract through the stack; its new schema registry does not introduce the same restriction.

Reviewed head: 51bacc365dd584d0f6caa50b1b9b7a56e1072dad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants