Repository navigation
chore(patches): remove operator routes and pins - #147
Conversation
Remove scoped operator APIs and pin storage before the auth data rewrite. Keep mint, me, upload, and owner-only delete; update contracts, analytics, tests, and domain documentation. Refs #136.
Astra reviewNo merge-blocking findings. Reviewed StandardsNo merge-blocking method or YAGNI findings. The change removes the capabilities at their existing wire, handler, and persistence boundaries without introducing replacement abstractions or future-facing machinery. Owner-only deletion is enforced directly in the SQL predicate. No blocking Effect-service convention violations found. SpecNo merge-blocking intent findings. The four requested routes remain; operator token-management routes disappear alongside their scope guards. Upload/update and delete stay principal-owned, without admin reach. Pins, moderation methods/schemas, and the specified analytics fields are removed. The baseline edit, generated API documentation, glossary/operator wording, and internal skill deletion match #136. The CLI README and public skill do not document the removed routes and need no changes here. Verification
Summary: Standards: 0 blockers (worst: none). Spec: 0 blockers (worst: none). |
|
Two-axis review of StandardsDeletion is mostly consistent: pin/unpin left together, Documented-standard findings
Baseline smells (all judgement) None beyond leftover names: Explicitly not findings
SpecHEAD (a) Missing or partial None of the listed Do items are missing. Routes in Pins are gone end-to-end: Glossary: Pinned patch and Moderation left Upload/delete are owner-only by principal: no (b) Scope creep None material. Extra edits (CONTEXT-MAP, README, auth/analytics glossaries, (c) Implemented but looks wrong Leftover operator store, not routes. Spec: “Remove from the wire and the server: … Stale hosting copy. Spec surfaces include vocabulary.
Intent vs #136The remaining system matches the intent sentence: after this PR the API is mint, me, upload and delete; a bearer has no scopes to check; no route acts on another bearer's token; nothing can be pinned. This removed operator capability in Patches, not just the HTTP door: Tokens is door-only:
MethodThe cut is the right seam. Operator HTTP had to leave before the auth rewrite, and token create/revoke routes with it — their only guard was In-place baseline edit is honest. ADR-0003 rewrites history because nothing is deployed; a new The 29 files are the surface list, not invented machinery. Net −1,298 lines. Remaining modules were mostly reshaped: Verdict: sound with scars. The scars are leftover labels ( YAGNINo speculative generality was added. This is a real delete. Would trim now, at zero extra cost:
Would not trim in this PR:
Standards: 2 hard + 3 judgement; worst: |
Address PR #147 review findings: remove unused operator creation and response helpers, keep revocation coverage through self-service minting, and correct stale operator surface documentation and guard fixtures.
|
Reviewed both agent reports against the source and #136. All five actionable findings are addressed in 6fceca5, committed and pushed. Fixed
Kept as-is, with reasons
Verification on the pushed revision
No unresolved blockers. Ready to merge; not merged. |
|
Also find it extremely weird that someone who works at Patchy cannot delete stuff by other companies unless they directly go to the database. At that point let there be a special key for Patchy admins. come on. |
|
@vsrikar08 Following up on your operator-key suggestion: Allison disagrees with this change. Keeping the removal of operator routes as proposed; we aren't restoring a special Patchy admin key or adding an operator takedown surface to this PR. |
## What changed The auth build is complete, but its docs still mix the old publishing model, shipped auth behavior and future plans. This pass reconciles the map, glossaries, product, ADRs and setup recipes so a fresh agent can sign in, log in the CLI, publish and open a page without reading an issue. **Rebased onto `main` after the auth stack merged.** This PR contains the final documentation pass over PRs #147–#159, preserving the newer invitation-expiry and current-public-version rules throughout the docs and skills. Closes #145. ## Surface audit | Surface | What this pass found | | --- | --- | | Wire contract | Corrected deletion cleanup timing in endpoint prose and regenerated `docs/API.md`; wire shapes unchanged. | | CLI | Aligned login completion, credential precedence, sharing and browser-only company reads across README, skill and onboarding; refreshed the skill hash. | | Dev loop | Reconciled Clerk keys, seed binding, isolated CLI state, lifecycle and both live test tiers. | | Vocabulary and product | Unified the five glossaries, corrected context relationships, separated shipped behavior from future plans and audited ADRs 0002–0008; none is superseded. | | Migrations | Verified the three baselines at server, dev-runner and Vitest composition sites; documentation clarified, migrations unchanged. | | Served pages | Corrected the example's publishing/access copy; no product UI or HTML-policy changes. | | Reverse states | Covered denial, logout, revocation, reactivation and sharing reversal. | | Repository layout | Updated package responsibilities, agent guidance and authoritative versus generated skill paths. | Removed obsolete route assertions while retaining general API-guard coverage. The retired-concept sweep leaves only legitimate lexical matches: dependency/origin pinning, sharing/cookie scopes and Effect's `Command.unlisted`. ## How it was verified - [x] `pnpm lint`, `pnpm typecheck`, `pnpm test` — 322 tests across 38 files. - [x] `pnpm test:packed-cli-e2e` — complete packed CLI real-server contract. - [x] `pnpm test:clerk` — two Backend-API tests and two Playwright workflows; cleanup confirmed zero test users remain. - [x] Local dev startup, publishing, both sharing transitions at both URL shapes, login handoff/pending/logout and rendered-example inspection. - [x] Skill hash and generated-bundle parity; relative Markdown file links; 62 unique glossary headings with no duplicates. - Standards review: two vocabulary findings fixed. Spec review: state-directory default clarified. No open findings. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — documentation, endpoint-description and obsolete-test cleanup only; runtime behavior and wire shapes unchanged. Model: OpenAI GPT-6 Astra. Harness: Oh My Pi. Integration verification: local formatting, lint, typecheck and all 322 offline tests pass. Reconciled both rounds of rebase conflicts, refreshed the public skill hash, corrected ADR-0007’s stale no-expiry claim, and documented the invitation-expiry migration. Final-head CI, including live Clerk/browser and packed CLI checks, is the merge gate. Integration: GPT-6 in the Codex harness.
Operator-only routes and token scopes need to leave before the auth data rewrite. Removing their guards without removing token management would let any bearer revoke another token.
This removes the operator routes, scope checks, and pins together, leaving mint, me, upload, and owner-only delete. It updates analytics, tests, generated API docs, and domain documentation, and deletes the operator mint-token skill. The patches baseline is edited in place as requested; existing local instances can use
pnpm dev reset.Stacked directly on
main;mainis this PR's base branch.Closes #136.
Verification
pnpm test— 151 tests passed across 25 files.pnpm typecheck,pnpm lint, andpnpm test:packed-cli-e2epassed.Implemented with OpenAI GPT-6 Astra (
openai-codex/gpt-6-astra) in the Oh My Pi harness.