Skip to content

Infra GA2: the token service on the owner's machine mints one-hour installation tokens #1841

Closed

Description

@jparker2006

Parent

Ticket GA2 of spec #1837 (Infra). Size: M.

What to build

The token service on the owner's machine, built on the merged minter: it mints one-hour installation tokens on request, scoped to the requested repositories within the App's installation and permissions, refuses anything else, hands each token over by the contract without printing it, and keeps an owner-only log of mints with no token in it. The App's key stays where it is, readable only by the owner. The runbook gains how the owner starts and stops it.

Owned paths

  • tools/github-app/token-service.py (new) and tools/github-app/test_token_service.py (new)
  • tools/github-app/mint-token.py (only what the service calls)
  • docs/github-app.md (shared: the token-service section)

Relies on: contracts/token-service.v1.md, contracts/token-service.v1.schema.json

Links

Acceptance criteria

  • A request for repositories in the installation gets a token expiring within an hour; any other repository or permission is refused, red first
  • The mint log holds no token, and the key file stays owner-only
  • 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

P2: the service's tests, 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/1841-token-service

    F6 prepare (orchestrator go): builds against GA1 #1839's approved head 419f3ad (PR #1896) and merges main after GA1 merges. The claim check's 'not on the frontier' is GA1 still unmerged, which the orchestrator's F6 prepare go covers.

    Checked: branch room/1841-token-service, PR #1915 at 307345f, builder status notes on this ticket.

  5. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    agent: builder
    state: done
    harness: claude-code
    model: claude-opus-5-5
    skills: build-ticket@0.2.0
    step: Handed back PR #1915 at fb0e944 with R1, R2 and R3 fixed, red first; waiting for the re-check.
    time: 2026-11-20T12:49:01Z
    pr: #1915

  6. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    needs-info (builder, #1915 at 307345f): the owned-paths check fails on 9 files.

    • 8 are GA1's contract files (contracts/token-service.v1.md, its schema and contracts/fixtures/token-service/*). They come from merging GA1's approved head 419f3ad, as the F6 prepare instruction said. They drop out when GA1 (#1839: Infra GA1: the token-service contract, first #1896) merges and I merge main in. No action needed.
    • 1 is .github/workflows/ci.yml: one added line, python3 -I tools/github-app/test_token_service.py, in the existing "The GitHub App" step. No new trigger, permission, secret or job. Without it CI never runs this ticket's P2 proof.

    Options:

    1. A record author posts F4 supporting edit granted here naming .github/workflows/ci.yml (this ticket's one line only). My pick: CI then runs P2 at every head.
    2. I drop the line, and P2 runs only locally and in review. That weakens the gate, so I don't recommend it.

    I'll keep the line and wait for the answer. The merge already waits for GA1 and the RL1 (#1671) cut.

  7. added
    needs-info
    on Nov 20, 2026
  8. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    F4 supporting edit granted (planner), for GA2: .github/workflows/ci.yml, exactly one added line, python3 -I tools/github-app/test_token_service.py, in the existing GitHub App step of the release job, beside GA1's and GA3's granted lines: no new job, trigger, permission or secret.

  9. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator

    The ci.yml line in #1915 (question 7039229175) is a workflow edit, so it waits for the orchestrator's F4 grant.

  10. removed
    needs-info
    on Nov 20, 2026
  11. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    F4 supporting edit granted (orchestrator): .github/workflows/ci.yml, for this ticket only: one added line, python3 -I tools/github-app/test_token_service.py, in the existing "The GitHub App" step. No new job, trigger, permission or secret; any other change to the workflow is not granted. GA1's eight contract files drop out when #1896 merges and main is merged in; no grant needed for them.

  12. added 4 commits that reference this issue on Nov 20, 2026
  13. jparker2006 commented on Nov 20, 2026

    @jparker2006
    MemberAuthor

    agent: builder
    state: done
    harness: claude-code
    model: claude-opus-5-5
    skills: build-ticket@0.2.0
    step: R3 fixed at 0095e34: the legacy G2 section opens with the GA2 warning.
    time: 2026-11-20T15:50:43Z
    pr: #1915

  14. added 2 commits that reference this issue on Nov 21, 2026
  15. jparker2006 commented on Nov 21, 2026

    @jparker2006
    MemberAuthor

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

  16. jparker2006 commented on Nov 21, 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