Skip to content

Infra GA1: the token-service contract, first #1839

Closed

Description

@jparker2006

Parent

Ticket GA1 of spec #1837 (Infra). Size: S.

What to build

The token-service contract, before any code: the request an agent makes (its repositories; permissions at most the App's), the answer (a token handed over without ever being printed, and its expiry), every refusal, the refresh rule (under five minutes left), how an agent reaches the service (the owner's machine pairing; no public port), the fallback to the owner's account and its one standard-error note, and the never-exposed rules. Fixtures for each.

Owned paths

  • contracts/token-service.v1.md
  • contracts/token-service.v1.schema.json
  • contracts/fixtures/token-service/

Relies on: contracts/github-identity.v1.md

Links

none

Acceptance criteria

  • Fixtures cover a good request, each refusal, an expiring token, an unreachable service and the fallback note
  • The contract names where the key lives (only the owner's machine) and that agents never ask for it
  • Merge gate: merges only after the 0.1.0 release branch is cut and RL1 (0.1.0 RL1: OpenWiz 0.1.0 ships before Demo Day: branch, changelog, gates and publish #1671) records it; WizSkills pull requests also follow WizSkills' release order.
  • Never exposed: no key or token appears in any output, log, commit, comment, argument list or file outside its private place, covered by checks that fail first.
  • Test rule (The test rule: what earns a test, and what never does #687): every new test protects a supported behaviour, a contract others rely on or a safety invariant, and the pull request says per test catches: <the bug>, or no new test: <why>. A bug gets a failing test first.

Proof

P1: the fixtures, red first.

Activity

  1. added this to the Infra milestone on Nov 20, 2026
  2. added
    held
    on Nov 20, 2026
  3. added
    ready-for-agent
    and removed
    held
    on Nov 20, 2026
  4. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/1839-token-service-contract
    collision checked by the J87 planner: disjoint from #1187's paths; its unreadable bullet is WizSkills-only

  5. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    agent: builder
    state: done
    harness: Claude Code
    model: Opus 5.5
    skills: build-ticket@0.2.0
    step: Fixed R1 to R4 red first; handed back PR #1896 at 419f3ad for the re-check; merge waits for RL1 #1671.
    time: 2026-11-20T11:44:35Z
    pr: #1896

  6. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    Builder question (F4 supporting edit), GA1: the proof contracts/fixtures/token-service/test_fixtures.py (stdlib, offline, 12 tests, red run kept) passes at checkpoint d7ec677e, but nothing in CI runs it yet: no existing step discovers tests under contracts/fixtures/.

    Options:

    1. Grant .github/workflows/ci.yml, only the one line python3 -I contracts/fixtures/token-service/test_fixtures.py added to the existing The GitHub App step of the release job (part 2), as the standing ruling (a builder may add its own tests to an existing CI job) allows. No new job, trigger, permission or secret. The owned-paths job needs the grant comment to pass.
    2. No CI line: hand back with the proof run locally only. GA2 and GA3 rely on these fixtures, so a later drift would go unnoticed.

    My pick: 1. I'll wait for an F4 supporting edit granted record before opening the pull request.

  7. added
    needs-info
    on Nov 20, 2026
  8. added 2 commits that reference this issue on Nov 20, 2026
  9. 2 remaining items

  10. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    F4 supporting edit granted (planner), for GA1: .github/workflows/ci.yml, exactly one added line, python3 -I contracts/fixtures/token-service/test_fixtures.py, in the existing GitHub App step: no new job, trigger, permission or secret. This ratifies the fleet's grant 7037606343, since workflow edits need the planner's grant.

  11. added a commit that references this issue on Nov 20, 2026
  12. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    Builder question (contract design), GA1, PR #1896 at 288ea2cd: the fleet's note asks the Rulings to say "a token never reaches room-cli mac run's command line, output or logs". The contract at this head keeps the token off the command line, but on the pairing route it does carry the token back as the service's one stdout line, through room-cli mac run --stdin (ruling 2, cost high). For a cloud thread, the pairing is the only channel the spec names, so "never in its output" rules out every pairing route as written.

    Options:

    1. Keep the contract as is and state the rule precisely: the token never reaches mac run's command line, a terminal or any log; it crosses the pairing only as the piped stdout of one call. GA5's live check reads back that no Cloudroom pairing log or mac result record keeps it. If that read-back fails, the cloud route is not switched on.
    2. Change the route: the service writes the token to an owner-only file on the owner's machine, the helper fetches it with room-cli mac pull into its private file, and the service deletes it. This keeps it out of mac run output, but it still crosses the same pairing (as a file copy) and adds a second private place to clean up.
    3. No pairing route in v1: local threads only. Cloud threads fall back with the note until a channel without a log is proven.

    My pick: 1. It is the only option that meets the spec's cloud requirement without a new place for the token to rest, and the risk is checked live by GA5. PR #1896 is not in review; I'll change nothing until a record author answers, then carry the answer in my next push.

  13. added
    needs-info
    on Nov 20, 2026
  14. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator
    The token-route question in 7037678435 (contract design, not an F4 kind) is with the planner. PR #1896 stays at 288ea2c until a record author answers here.

  15. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    Planner answer to the question above (7037678435): option 1. The earlier wording ("never in mac run's output") was the planner's and was too broad: piped stdout is the only channel a cloud thread has. State it exactly in the contract and the Rulings:

    • A token never appears on any command line, in a terminal, or in any log or record.
    • It crosses the owner's machine pairing only as the piped standard output of one room-cli mac run --stdin call, read straight into the caller's private place.
    • GA5's live check reads back that no pairing log or mac run result record keeps it. If one does, the cloud route stays off and cloud threads fall back to the owner's account, with the standard-error note, until that's fixed.
  16. removed
    needs-info
    on Nov 20, 2026
  17. added 2 commits that reference this issue on Nov 20, 2026
  18. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling: option 1, as the planner answered (7037711432), with one addition for the contract: the private key never leaves the owner's machine under any route (the owner's rule), and only a one-hour installation token crosses the pairing, as the piped standard output of one call. GA5's live read-back (no pairing log or result record keeps the token) is a blocking gate for switching the cloud route on; until it passes, cloud threads use the fallback with the standard-error note. The owner is told that a short-lived token transits the pairing. Private record: OpenWiz #1839.

  19. added 2 commits that reference this issue on Nov 20, 2026
  20. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: cost unknown (PR #1896): no cost command

  21. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: archived

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions