Skip to content

spec(claw): github_surface -- every GitHub API surface, its .t27 value, the narrow token it mints (Closes #10277) - #10280

Merged
gHashTag merged 2 commits into
masterfrom
claude/claw-github-surface
Oct 18, 2026
Merged

gHashTag merged 2 commits into
masterfrom
claude/claw-github-surface

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10277

TRI CLAW now holds write on 40 repository permissions across every gHashTag repository (GET /apps/tri-claw, 2026-10-18T06:59:05Z). This spec records what each GitHub API surface is worth to .t27, and the narrow token a job serving it may mint. The grant can stay wide; every token stays narrow.

What lands: specs/claw/github_surface.t27, 22 rows: surface, permission, level, status, endpoint, value.

Status Rows
planned (mintable) check-run, check-annotations, code-scanning-sarif, pr-files, pr-suggestions, spec-read, autofix-commit, cross-repo-dispatch, t27f-preview, findings-issues, dependency-snapshot
owner yes only required-check-ruleset (claw/t27f pinned to integration_id 5166765)
Actions does it attestations (signing needs Actions OIDC)
needs a webhook receiver check-run buttons, merge_group
unavailable custom properties (organizations only; gHashTag is a user)
refused commit statuses, secrets, workflows, other administration, codespaces/agents, repo creation/hooks

The law, as asserts:

  • The claw/t27f job mints exactly three scopes: checks write, pull_requests read, contents read.
  • secrets, workflows, statuses, codespaces and repository_hooks never reach a token, even with the owner's yes.
  • administration is minted only for the ruleset row, and only on the owner's yes.
  • Unknown surfaces fail closed.
  • over_granted counts the permissions no token will ever use: 9 without the owner's yes, 8 with it. That is exactly how far the owner can narrow the App.

Railway lab: spec-status IMPLEMENTED; the per-spec report shows 10/10 pass, 0 FAIL, and none passing with zero runtime asserts. Lab file sha256 3eec162c... matches the branch. str_eq is reused from claw::recipes, and dupe_scan --like reports nothing new.

Honest limit: the table says what each surface is for. It does not prove that a workflow passes the scope it names. Each planned row's own lane carries that.

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 18, 2026 14:13
…e, and the narrow token it mints

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 07:24
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 07:25:51 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 50
PRs with All Checks Green 0
READY 0
FAILING 50
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=0f8c66b9ed0e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 6242927 into master Oct 18, 2026
27 of 30 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
…requests:read, contents:read (Refs #10268)

The App holds write on about 40 permissions across every gHashTag
installation; an unscoped token minted from a t27 branch would carry
secrets, workflows and administration write. The three scopes are the
check-run, pr-files and spec-read rows of specs/claw/github_surface.t27
(#10280).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 18, 2026
… request through the TRI CLAW App (Closes #10268) (#10283)

* feat(claw): claw/t27f -- the seal-gated T27F check on every .t27 pull request through the TRI CLAW App (Closes #10268)

- specs/claw/t27f_gate.t27 (+ zig-only pins): scope = changed .t27 plus
  direct importers, judged by `t27c seal --verify`, decision reuses
  hot.t27; unsealed neutral, stale/vacuous/unreadable failure, malformed
  input fails closed. MODE_T27F in specs/claw/service.t27.
- gen/c/claw/t27f_gate.c: its gen-c lowering; spec-guards.yml now
  regenerates both claw C files and diffs them.
- gate-topology.yml: a claw-t27f job on a new 10-minute schedule and on
  workflow_dispatch; the existing job skips the schedule; concurrency
  keyed by event. The job mints the App token (secret
  CLAW_APP_PRIVATE_KEY, variable CLAW_APP_ID) and exits 0 with a notice
  when either is absent. It only fetches, runs the cosign-verified
  t27o-v0.1.0 t27c and posts what the law prints.
- specs/claw/gates.t27: gate-topology events gain schedule (67 workflows,
  62/3/2 unchanged); gen/c/claw/gates.c regenerated.
- docs/claw/README.md: the owner checklist. AGENTS.md section 8: pointers
  to what landed.
- Own-language offset: scripts/gen_w389.py deleted (spent generator, no
  runtime refs). MAX_DEAD_TRI unchanged at 140.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seals(claw): reseal gates/gates_pins/service and seal t27f_gate/t27f_gate_pins after #10250 (Refs #10268)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(claw): mint the claw/t27f App token scoped to checks:write, pull_requests:read, contents:read (Refs #10268)

The App holds write on about 40 permissions across every gHashTag
installation; an unscoped token minted from a t27 branch would carry
secrets, workflows and administration write. The three scopes are the
check-run, pr-files and spec-read rows of specs/claw/github_surface.t27
(#10280).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

TRI CLAW: GitHub API surface law -- every surface, its .t27 value, the narrow token it mints

1 participant