main · last commit
18 hours ago ·
8tmadfpi
spec-oqk Derive specs' api-meta.json scope list and local grant check from one source
Lined Up
bd update spec-oqk --claim
bd close spec-oqk
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-08-17T20:40:07Z |
| Updated | 2026-08-17T20:40:07Z |
What is wrong: in specs, the `api-meta.json` scope list and the locally-checked grant string are declared and maintained as two separate pieces of code, instead of being derived from one source of truth. Why it matters: when the two drift, renaming or restyling a grant silently invalidates every previously-minted token carrying the old spelling, and nothing on the service side notices — this is the exact measured lesson behind the `cover:`/`cov:` mismatch found in tokens' SPEC.md (tracked there as its own issue). Sibling that does it correctly: `sourcehut-artifacts/core/grants.go` + `core/grants_test.go` (and bench's equivalent) derive both the published scope list and local grant validation from a single `core.Grants` array, and pin the agreement with a test. Fix: adopt the single-array + agreement-test pattern in specs — replace the separately-declared `api-meta.json` scope list and the locally-checked grant string with one `core.Grants`-style array and a test asserting they agree. Note: confidence reported (not independently re-verified in this pass) — reproduce specs' current grant declarations before starting the fix. Audit: D17 (cross-repo audit, 2026-08-17)
No outgoing dependencies.
Nothing depends on this issue.
| id | spec-oqk |
| content_hash | 6f81ba2e8169f712c3501d0fa8c766e903f1189ee669e6b3970de69fca26d7e9 |
| title | Derive specs' api-meta.json scope list and local grant check from one source |
| description | What is wrong: in specs, the `api-meta.json` scope list and the locally-checked grant string are declared and maintained as two separate pieces of code, instead of being derived from one source of truth. Why it matters: when the two drift, renaming or restyling a grant silently invalidates every previously-minted token carrying the old spelling, and nothing on the service side notices — this is the exact measured lesson behind the `cover:`/`cov:` mismatch found in tokens' SPEC.md (tracked there as its own issue). Sibling that does it correctly: `sourcehut-artifacts/core/grants.go` + `core/grants_test.go` (and bench's equivalent) derive both the published scope list and local grant validation from a single `core.Grants` array, and pin the agreement with a test. Fix: adopt the single-array + agreement-test pattern in specs — replace the separately-declared `api-meta.json` scope list and the locally-checked grant string with one `core.Grants`-style array and a test asserting they agree. Note: confidence reported (not independently re-verified in this pass) — reproduce specs' current grant declarations before starting the fix. Audit: D17 (cross-repo audit, 2026-08-17) |
| design | |
| acceptance_criteria | |
| notes | |
| status | open |
| priority | 2 |
| issue_type | task |
| assignee | NULL |
| estimated_minutes | NULL |
| created_at | 2026-08-17T20:40:07Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-08-17T20:40:07Z |
| closed_at | NULL |
| closed_by_session | |
| external_ref | NULL |
| spec_id | |
| compaction_level | 0 |
| compacted_at | NULL |
| compacted_at_commit | NULL |
| original_size | NULL |
| sender | |
| ephemeral | 0 |
| wisp_type | |
| pinned | 0 |
| is_template | 0 |
| mol_type | |
| work_type | |
| source_system | |
| metadata | �{} |
| source_repo | |
| close_reason | |
| event_kind | |
| actor | |
| target | |
| payload | |
| await_type | |
| await_id | |
| timeout_ns | 0 |
| waiters | |
| hook_bead | |
| role_bead | |
| agent_state | |
| last_activity | NULL |
| role_type | |
| rig | |
| due_at | NULL |
| defer_until | NULL |
| no_history | 0 |
| started_at | NULL |
| is_blocked | 0 |
| id | 01a01173-f5a4-73ef-891a-9f3b806dbdce |
| issue_id | spec-oqk |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-08-17T23:40:07Z |
No comments.