Repository navigation
Propose add-notebook-hosting-credential-custody: one identity, per-system authority - #282
Conversation
…stem authority Brett's direction on 2026-08-23, verbatim in the origin record: "this is a xFactor001 login. and we want to store the password in a kv and have xFactory and openXdox login with its own authority", refined by three question-prompt rulings — the existing QA-estate vault, per-system bindings, and a migration that proceeds in parallel. add-notebook-projection-identity named the account and said nothing about its credential, which left the password wherever its creator put it: the personal-account failure moved one level down rather than removed. Three ADDED requirements, nothing MODIFIED. The ratified generalization carries only HALF the hook — it forbids hard-coding a credential but does not require custody to exist, so an account whose password lives only in its creator's head satisfies it. This adds the positive obligation, extends it to the whole credential set including a second factor's seed, and rules one identity with per-system authority: each consuming system gets its own binding, access identity, grant, rotation visibility and audit trail. Nothing is MODIFIED because that generalization is ratified but unpromoted and belongs to an active change; a second live delta on one requirement text is not worth the tidiness. Two findings from the repository redirected the route, both flagged rather than absorbed quietly. The promoted by-reference requirement already refuses distributing refreshable session state, and the nlm profile is exactly that class — so the no-shared-session ruling is independently required on credential- class grounds, not only accountability. And the live binding INSTANCES do not belong in openxFactory at all: contracts/manifest.yaml records that the repo ships no instance records because they live in client installs. So the neutral obligations land here and the concrete bindings land in the install lane and openXdox's own — which is what the ruling already said for the openXdox half, extended to the xFactory half for the same reason. Honest gaps recorded as the ruling demanded: custody is not automation, a TOTP seed may itself need custody, and no live secret is created, moved or read by this change. Status: draft. Ratification is Brett's separate act. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new draft OpenSpec change packet (add-notebook-hosting-credential-custody) that defines additional governance requirements for NotebookLM hosting-account credential custody (by reference) and per-consuming-system authority, and records the proposal/design/tasks metadata for ratification.
Changes:
- Adds draft delta requirements for
credential-contracts(governed custody + per-system bindings) andlifecycle-notebook-projection(hosting record declares custody by reference only). - Adds the change packet artifacts (
proposal.md,design.md,tasks.md,.openspec.yaml) underopenspec/changes/add-notebook-hosting-credential-custody/. - Registers the new draft change in
README.mdunder OpenSpec Records → Active changes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds the new draft change to the “Active changes” index with context and scope notes. |
| openspec/changes/add-notebook-hosting-credential-custody/tasks.md | Draft realization task list for the custody + per-system authority requirements. |
| openspec/changes/add-notebook-hosting-credential-custody/specs/lifecycle-notebook-projection/spec.md | Adds a delta requirement for custody-by-reference in the hosting record (operator-hosted vs self-hosted). |
| openspec/changes/add-notebook-hosting-credential-custody/specs/credential-contracts/spec.md | Adds delta requirements for governed custody (whole credential set) and per-consuming-system bindings. |
| openspec/changes/add-notebook-hosting-credential-custody/proposal.md | Draft proposal narrative and declared code/doc surfaces (no realization in this PR). |
| openspec/changes/add-notebook-hosting-credential-custody/design.md | Draft design rationale tying the requirements back to prior promoted rules and repository residency constraints. |
| openspec/changes/add-notebook-hosting-credential-custody/.openspec.yaml | Change metadata (origin, authorization, timestamps) for the new draft packet. |
Suppressed comments (1)
openspec/changes/add-notebook-hosting-credential-custody/tasks.md:30
- Task 2.2 lists a generic
profilefield as “secret-shaped”, but the hosting record already hashosting.nlm_profile(a non-secret selector). To avoid implementers overreaching (and to match the added requirement wording), tighten this toexported_profile(or equivalent) rather than anyprofilefield.
- [ ] 2.2 REFUSE anything secret-shaped in the record — a `password`,
`totp`/`otp_seed`, `recovery_code`, `cookie`, `session` or `profile` field,
and any value that looks like credential material rather than a reference.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - [ ] 1.1 Add a `custody:` block to `examples/notebook-projection-hosting.yaml` | ||
| carrying a BY-REFERENCE pointer only: the binding's identifier, the secret | ||
| reference, and what the custody covers. No password, recovery code, TOTP | ||
| seed, session cookie, or exported profile — in this file or any other. |
There was a problem hiding this comment.
Accepted. The requirement says the hosting record identifies the custody BINDING, and task 1.1 then asked it to carry the secret_ref as well — redundant, and exactly the kind of duplication that invites the rest of the binding to follow it into the record.
Task 1.1 now says the binding's IDENTIFIER and what the custody covers, explicitly NOT the secret_ref, with the reason inline. Task 2.1 goes further and has the validator REFUSE a secret_ref in the hosting record, so the boundary is enforced rather than merely described. The Impact section carries the same correction.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73be80f86f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### Requirement: Each consuming system reaches a shared operated identity through its own binding | ||
| Where more than one system authenticates as the SAME operated identity, each consuming system SHALL reach that identity's credential through its OWN binding: its own access identity against the secret store, its own grant, its own rotation visibility, and its own audit trail. One identity MAY be shared; one AUTHORITY SHALL NOT. A system SHALL NOT borrow another system's binding, and SHALL NOT consume the identity through a session another system established. | ||
|
|
||
| Per-system bindings are what make the consequential acts separable. With one shared route, revoking either system's access revokes both, the store's access log cannot say which system read the secret, and a compromise of one is indistinguishable from a compromise of the other. Separate bindings SHALL be revocable independently, and revoking one SHALL NOT disturb the other. |
There was a problem hiding this comment.
Drop the independent-revocation guarantee for one shared password
Once either system has fetched the shared password or established a Google session, revoking its vault binding only prevents future fetches; it cannot make the already disclosed bearer secret unusable or terminate the session. Rotating the password to evict a compromised consumer can also affect the other consumer, so the unconditional guarantee that one binding can be revoked without disturbing the other is not implementable with the proposed shared credential.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Accepted, and this is the sharpest thing said about the packet. I wrote the guarantee unconditionally — "separate bindings SHALL be revocable independently, and revoking one SHALL NOT disturb the other" — and for a shared BEARER secret that overclaims in exactly the way you describe.
What a binding actually controls is FUTURE FETCHES. It cannot un-disclose a password already fetched, and it cannot terminate a Google session already established with it. Evicting a consumer that has read the secret means ROTATING it, and rotation reaches every consumer of that identity — the one act per-system bindings cannot make independent.
The requirement now scopes the guarantee to "the other's ability to fetch", adds a paragraph headed WHAT REVOCATION REACHES that states the bearer-secret limit plainly, requires an adopting change to record the shared rotation cost "rather than let per-system bindings read as per-system containment", and carries a new scenario: a consumer that already holds the secret is evicted by rotation, and that shared cost is recorded rather than described as independent revocation. The proposal's honest-gaps list carries the short form.
This is the same discipline the packet already applies to custody-is-not-automation, applied to a claim I had not noticed I was making.
| - **`contracts/` is untouched.** The binding-template shape is already | ||
| published; nothing here changes a schema, a manifest row or a digest, and no | ||
| bundle is cut. `target_release: none`. |
There was a problem hiding this comment.
Define the access identity before declaring the schema sufficient
The published binding schema requires only provider, secret_ref, owner, and rotation_policy; it has no required consumer/access-identity or grant reference, and the credential validator does not compare those authorities. Because this plan explicitly leaves the schema and validator unchanged, two bindings using the same vault principal still validate, so the central per-system-authority invariant cannot be represented or enforced as proposed.
AGENTS.md reference: AGENTS.md:L9-L10
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Accepted — verified against the schema and the validator before changing anything. credential_bindings.additionalProperties requires only [provider, secret_ref, owner, rotation_policy] with optional vault (schema lines 140-146); there is no consumer or access-identity property, and validate-credential-contracts.py compares only secret_ref values, never authorities. So two bindings on the same vault principal validate cleanly and the central invariant is not representable in the record, let alone enforced.
Rather than leaving target_release: none to imply otherwise, the packet now says so directly: the per-system invariant is held TODAY by review and estate wiring, not proven by the record. A new scenario states it in the requirement itself, the Impact section carries it, and tasks §4.5 names the successor that would extend the shape — noting that it DOES carry the full contract-release ritual (CHANGELOG allocation, manifest digest, contract_bundle_version bump, inventory rebuild, verify-commit, tag), which is precisely why it is a successor rather than something folded in here.
| `client` envelope. Two entries, one per consuming system, is the whole shape: | ||
| distinct `secret_ref` is not required of them (both resolve the same account's | ||
| password) but distinct OWNER and distinct access identity are the point, and the | ||
| validator already carries a `shared-secret-identity` check for bindings that |
There was a problem hiding this comment.
Reconcile the duplicate-secret check with the planned fixture
For the proposed single fixture containing two system entries that resolve the same account password, scripts/validate-credential-contracts.py lines 124–127 emits shared-secret-identity whenever two bindings have the same secret_ref. Thus the design's statement that distinct references are unnecessary conflicts with the authoritative validator, and choosing task 4.1 as written will make the required credential validation gate fail unless that rule or the fixture representation is changed.
AGENTS.md reference: AGENTS.md:L9-L10
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Accepted, and it changes the decision rather than just the wording. Confirmed at scripts/validate-credential-contracts.py: shared-secret-identity fires whenever two bindings in one template share a secret_ref — and two consuming systems reaching ONE account password is exactly that shape, so the fixture as designed would have failed the very gate this change lists.
The fixture is now DECLINED, with the reasoning recorded rather than the plan quietly dropped: giving the two entries distinct secret_refs to satisfy the rule would misrepresent the estate (there is one secret), and relaxing the rule would weaken a check that exists to keep the dispatch and content credentials apart. The requirement text carries the two-binding shape instead, and contracts//examples/ stay untouched.
Recorded for whoever wants a fixture later: shared-secret-identity cannot presently distinguish "two credentials collapsed into one" — the fault it was written for — from "two consumers of one deliberately-shared identity". Deciding that is a prerequisite of any such fixture, and the self-test count in tests/credential_contracts/ rides with it.
Codex's P1 is right and it is the sharpest thing said about this packet. I wrote that separate bindings are independently revocable and that revoking one does not disturb the other, unconditionally. For a shared BEARER secret that overclaims: revoking a binding stops future fetches and nothing else — it cannot un-disclose a password already fetched, nor end a session already established with it. Evicting a consumer that has read the secret requires rotation, and rotation reaches every consumer of that identity. The requirement now scopes the guarantee to what a binding actually controls, states the shared rotation cost as the one act these bindings cannot separate, and carries a scenario for it. Codex's schema finding is also right. The published binding shape carries no consumer or access-identity field and the validator compares no authorities, so two bindings on the same vault principal validate cleanly and the central invariant is not representable, let alone enforced. Rather than implying otherwise with target_release: none, the packet now says the invariant is held by review and estate wiring today, and names extending the shape as an owed successor — one that DOES carry the contract-release ritual, which is exactly why it is not smuggled in here. Codex's fixture finding closes the third gap: shared-secret-identity fires whenever two bindings in one template share a secret_ref, and two consumers of one account password is precisely that shape. Distinct references would misrepresent the estate and relaxing the rule would weaken a check that exists to keep dispatch and content credentials apart, so no fixture is added and the requirement text carries the shape. The check's inability to tell "two credentials collapsed into one" from "two consumers of one credential" is recorded for whoever wants a fixture later. Copilot caught that task 1.1 asked the hosting record to carry the secret_ref while the requirement says it identifies the BINDING. Redundant, and an invitation for the rest of the binding to follow it in. The record now carries the binding identifier only, and the validator refuses a secret_ref there too. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
openspec/changes/add-notebook-hosting-credential-custody/specs/credential-contracts/spec.md:58
- This scenario bullet is incomplete (it ends with “because each has its own”), which makes the intended guarantee hard to read.
- **THEN** it names which consuming system's identity performed it, because each has its own
| THE REALIZATION RUNS POST-RATIFICATION. No hosting-record, validator, doc or | ||
| example edit lands with this proposal itself, and **no live secret is created, | ||
| moved, or read by authoring it**. Putting the actual password into the vault is |
| #### Scenario: A binding names the concrete vault | ||
| - **WHEN** a per-client binding instance names its provider, vault, secret reference, owner and rotation policy | ||
| - **THEN** that is conforming: the binding is exactly where a concrete estate fact belongs | ||
| - **AND** the same values appearing in a contract artifact or lane definition would not be |
…ed residency redirect Brett Heap ratified in-session on 2026-08-23, ruling two things in the one read: ratify the requirement set as it stands, and ACCEPT the residency redirect — the neutral obligations live here and the live binding instances land in the consuming installs as named successors, with the repository's own manifest rule holding unchanged. His original direction had asked for the concrete instances on the credential-contracts side; the packet flagged the conflict rather than resolving it quietly, and this is his resolution. All three flagged items were before him: the residency redirect, the unpromoted-generalization sequencing, and the admitted enforcement gap — that per-system authority is held today by review and estate wiring rather than proven by the record, because the published binding shape carries no consumer or access-identity field, with the schema extension named as an owed successor that carries the release ritual. The record also carries the pre-ratification bot round: Codex's finding that per-system bindings are not per-system containment for a shared bearer secret, its two follow-ons, and Copilot's binding-not-secret note. Co-Authored-By: Claude Fable 5 <[email protected]>
…osting-credential-custody
| `add-client-identity-roster`. This records authorization to AUTHOR the | ||
| proposal, not ratification of its content: that is a separate act, still | ||
| PENDING, and the proposal stands at `Status: draft` until it happens. |
| - [add-notebook-hosting-credential-custody](openspec/changes/add-notebook-hosting-credential-custody/proposal.md) | ||
| — authored 2026-08-23, **NOT YET RATIFIED** (`Status: draft`). The follow-up | ||
| to `add-notebook-projection-identity`, on Brett Heap's direction the same day: |
Follow-up to
add-notebook-projection-identity, authored on Brett Heap'sdirection the same day it was ratified. Status: draft — ratification is a
separate act, and no live secret is created, moved, or read by this packet.
Why
The declared-identity change named Opensoft's hosting account
(
[email protected]) and deliberately said nothing about itscredential. That leaves the password wherever the person who created the
account put it — the personal-account failure the change existed to retire,
moved one level down rather than removed.
Brett's direction, verbatim: "this is a xFactor001 login. and we want to store
the password in a kv and have xFactory and openXdox login with its own
authority." Three refinements followed: the existing QA-estate vault
(
kv-opensoft-xfactory-qa), per-consuming-system bindings, and a migration thatproceeds in parallel on his interactive login.
What it adds — three requirements, nothing MODIFIED
credential-contracts(2 ADDED)only half the hook: it forbids contract artifacts hard-coding a
credential, but does not require custody to exist — an account whose
password lives only in its creator's head satisfies it perfectly. This
requires the credential to be held in a governed store and reached only by
reference, extends custody to the whole credential set (a password in a
vault beside a TOTP seed on someone's phone is a single point of failure
wearing governance), and states that custody must not be claimed to deliver
automation.
shared operated identity through its own binding: own access identity,
own grant, own rotation visibility, own audit trail. One identity may be
shared; one authority may not. Each binding is revocable on its own and the
store's access log can say which system read the secret — but revocation
reaches only FUTURE fetches, and evicting a consumer that already holds the
secret needs rotation, which reaches everyone. The requirement says so (see
the review round).
lifecycle-notebook-projection(1 ADDED) — the hosting record declareswhere the credential lives, by reference only: sufficient to find it through
the governed path, insufficient to obtain it without one. No password, recovery
code, TOTP seed, session cookie or exported profile in the record, the
repository, or any projection artifact. Self-hosted declarations owe no custody.
Nothing is MODIFIED, deliberately. The generalization these hang on belongs
to
add-notebook-projection-identity, which is ACTIVE with its own ratified butunpromoted delta on that exact requirement — it promotes when that change
archives on its migration evidence. A second live delta on one requirement text
is not worth the tidiness.
Two findings from the repository that redirected the route
1. The by-reference requirement already refuses the shortcut. The promoted
add-worker-credential-by-referencetext says a "refreshable session-statecredential (one its consumer rewrites in place) SHALL NOT be distributed by any
channel" — and the
nlmprofile (cookies,csrf_token,session_id, rewrittenin place on refresh) is exactly that class. So Brett's no-shared-ambient-
session ruling is independently required on credential-class grounds, not only
on accountability. The password is the right class for a vault; the session
profile must never become one. Corroborating precedent found in the estate:
vaultref://kv-opensoft-xfactory-qa/secrets/xfactor-001-claude-credentials-json,whose archived tasks already say "token class NOT the session file".
2. The live binding instances do not belong in openxFactory — and the repo
says so in its own manifest, not by inference:
contracts/manifest.yamlrecordsthat "openxFactory ships no instance records (they live in client installs,
credential-contracts residency model)", and the starter pack says "Bindings
belong to client or tenant deployments, not the domain repo." The one binding
artifact here is a packaged fixture — literally
openxdox-dispatch.binding-template.example.yaml.So the split: neutral obligations here; the live xFactory sync-lane binding
in the install's
credentials/tree besidecir-opensoft-qa-dox-dispatch-minter;the live openXdox binding as its own successor packet in its own lane — which is
what the ruling already directed for the openXdox half, extended to the xFactory
half for the same reason. This is flagged for the ratification read, not
decided quietly: the ruling asked for the instances here, and the
repository's rule puts them there. Wanting them here means changing the
residency rule first, in its own change.
The contracts-or-not decision
Nothing lands under
contracts/, and no release ritual fires. Thexfactory_credential_binding_templateshape is already published(
[provider, secret_ref, owner, rotation_policy]required,vaultoptional),so there is no schema to add or change, no manifest row, no digest, no
contract_bundle_versionbump, no inventory rebuild, no verify-commit, no tag.Bundle stays contract-v1.40;
target_release: none.Decided on the same ownership test used for the hosting record, not on the cost
of the ritual — and the precedent is exact:
add-worker-credential-by-reference'sown packet was three files with no contracts artifact, stating "No contract
bundle was cut".
One boundary worth naming: the successor that would make per-system authority
provable — a consumer/access-identity field on the binding shape — is a
contracts/schemas/change and would carry the full ritual. That is why itis named as a successor (tasks §4.5) rather than folded in here.
Honest gaps, recorded rather than assumed away
unattended:
nlmdrives a browser, sessions last ~20 minutes,--cdp-urlisa mechanism rather than a solution, and Google may interpose 2FA or a device
check at any time. Automated login is future work gated on proving the flow.
is not yet known, so the requirement covers the case by naming the whole
credential set rather than the password alone.
operator's act under the landed rule, evidenced per
credential-contracts.archives.
Review round — four findings, all taken
Codex P1, the sharpest: per-system bindings are not per-system containment.
I claimed separate bindings are independently revocable and that revoking one
does not disturb the other, unconditionally. For a shared bearer secret that
overclaims: revocation stops future FETCHES and nothing else — it cannot
un-disclose a password already fetched or end a session already established.
Evicting a consumer that has read the secret requires rotation, which
reaches every consumer. The requirement now scopes the guarantee to fetching,
states the bearer-secret limit under its own heading, requires an adopting
change to record the shared rotation cost, and carries a scenario for it.
Codex: the invariant is not representable in the published shape. Verified
— the binding object requires only
[provider, secret_ref, owner, rotation_policy]with optionalvault, has no consumer/access-identityproperty, and the validator compares no authorities, so two bindings on one
vault principal validate cleanly. The packet now says the invariant is held by
review and estate wiring today, with a scenario admitting it, and names the
shape extension as an owed successor — one that does carry the
contract-release ritual, which is why it is not folded in here.
Codex: the planned fixture would have failed this change's own gate.
shared-secret-identityfires whenever two bindings share asecret_ref, andtwo consumers of one account password is exactly that shape. The fixture is
declined, with the reasoning recorded: distinct references would
misrepresent the estate, and relaxing the rule would weaken a check that keeps
dispatch and content credentials apart. Recorded for later: that check cannot
presently distinguish "two credentials collapsed into one" from "two consumers
of one deliberately-shared identity".
Copilot: the record should name the binding, not the secret. Task 1.1 asked
for a
secret_refin the hosting record while the requirement says itidentifies the binding — redundant, and an invitation for the rest of the
binding to follow. The record now carries the binding identifier only, and the
validator refuses a
secret_refthere.Gates
openspec validate add-notebook-hosting-credential-custody --strict— validopenspec validate --all --strict— 74 passed, 0 failed (fresh-counted;24 active changes + 49 specs at this tip, plus this change)
pytest tests/ideation-dashboard— 3983 passed, 15 skippedpytest tests/ideation_dashboard tests/doc-health tests/notebooklm tests/credential_contracts— 904 passed, 13 subtestsvalidate-notebook-projection-hosting.py— 0 errorsvalidate-credential-contracts.py .— PASS, 0 errorsorigin/main(189d0030) baseline — 0 newfindings (4 critical / 8 error / 77 warning / 3 info both sides; the 8th and
9th errors are the pre-existing MedxChart/MedxPractice
proposal-originones,not from this change)
contracts/untouched🤖 Generated with Claude Code