Repository navigation
docs(skills): teach the recycle bin restore, purge and list doors in objectstack-api - #31769
Conversation
…n objectstack-api
The api skill said the recycle bin had no restore or purge door and that
restore / purge never derive. Both shipped with ADR-0148: restore and purge
derive from delete, and four REST doors sit under
/api/v1/data/{object}/recycle-bin, gated by allowRestoreOwnDeleted and
manageRecycleBin. Rewrite both passages from the live tree, regrade the
undelete eval, and pay the bytes with cuts whose rules survive in the file.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTbKfNKjrN2RAefJDH
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTbKfNKjrN2RAefJDH
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract-review-claim: session_01QsR2jULfPnqQFGcZUtKDFH · head 4efbaef · 2026-11-09T03:17Z The lane seat's isolated Fable reviewer runs the |
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract reviewServed-tier: Inputs: card #30847 body and all eight comments (triage 6679098621, the first-half claim / widen / ACCEPT / release 6687853924–6691834213, unblock 6730635071, this round's claim 6731158435 and dev report 6731390373); PR #31769 body, file list (3 files) and Gate verdicts on the head (read, not re-run): every concluded gate is ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Every door, route, grant and refusal code the two rewritten passages name exists in the live tree exactly as taught (① 1-6). Tried to break it: (a) "
The rewritten
Judged and not a finding: Implemented-by: VERDICT: PASS |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTbKfNKjrN2RAefJDH
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract-review-claim: session_01QsR2jULfPnqQFGcZUtKDFH · head f150834 · 2026-11-09T03:26Z The lane seat's isolated Fable reviewer runs the |
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH Contract reviewServed-tier: DELTA ROUND on the previous head Inputs: card #30847 body and all comments (no comment newer than the dev report 6731390373; the fix commit carries no report of its own); PR #31769 body (unchanged since the previous record), file list (3 files), Gate verdicts on the head (read at 2026-11-09T03:28Z, not re-run): every concluded gate is ① Derived judgmentsItems 1 to 7 and 9 of 6731493470 ① carry forward unchanged: SKILL.md is byte-identical to
② Semver levelUnchanged from 6731493470: ③ Boundary flags
④ Design judgment
Judged and not a finding: Implemented-by: VERDICT: PASS |
|
domain:skills#3 · zhuangjianguo · session_01QsR2jULfPnqQFGcZUtKDFH 维护者速读
席位核对Head-sha:
|
Requested by Steedos · project thread
Fixes #30847
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-api技能改写两处:派生动词段落改为restore/purge由delete派生;常见陷阱第 2 条教会回收站的四个 REST 入口、两个权限和四个恢复拒绝码;"恢复已删发票" eval 改为按新教学打分。skills/objectstack-api/SKILL.md常见陷阱第 2 条;同文件"Derived operations"表下的restore/purge句;skills/objectstack-api/evals/endpoints-auth-routes.json第 5 例。node scripts/check-skills-token-ratchet.mjs | grep objectstack-api/SKILL,预期5157 tokens (ceiling 6314; headroom 1157)。What changes
skills/objectstack-api/SKILL.md, passage under Derived operations: "restore/purgenever derive: the recycle bin has no restore or purge door yet" becomes "restore/purgederive fromdeleteand open the recycle-bin doors (pitfall 2)" (API_METHOD_DERIVATIONinpackages/spec/src/data/api-derivation.ts).DELETEas final"): what a delete keeps (business-object rows, 30-day default retention, notmulti: true/ platform rows / rows deleted before the bin existed), therecycleBinEntryIdthe delete answers, the four doors under/api/v1/data/{object}/recycle-bin(POST /:entryId/restore,GET,DELETE /:entryId,DELETE), who may use them (allowRestoreOwnDeletedfor one's own deletes,manageRecycleBinfor others' and for list / purge / empty), and the four409restore refusal codes.skills/objectstack-api/evals/endpoints-auth-routes.jsoncase 5:expected_outputteaches thatrestorederives fromdelete(so the asked-for read-only API also closes the bin's doors) and names the restore door and grants;must_containswapsrecycle binfor/recycle-bin/;must_not_containadds the stale phrasenothing lists or restores.'restore'stays: it still guards declaring a derived verb inapiMethods.queryone" → the Derived operations table rowaggregate→POST /data/{object}/query./api/v1/for versioning" → every row of the Endpoint Naming Conventions table.authRequiredand the D6 pairing.public+permissionspair).Readthe source for exact field shapes")..changeset/30847-api-skill-recycle-bin-doors.md:'@objectstack/skills': patch.Doors and grants, each read in the live tree (
main9e1f1f9):packages/rest/src/recycle-bin-routes.ts(four routes and theirrestore/purgeexposure),packages/spec/src/api/protocol.zod.ts(DeleteDataResponseSchema.recycleBinEntryId, the restore path),packages/objectql/src/recycle-bin/restore.ts,list.ts,purge.ts,retention.ts(gates, 30-day default),packages/core/src/security/effective-object-permissions.ts(GRANT_BITS),packages/spec/src/data/recycle-bin.zod.ts(RECYCLE_BIN_RESTORE_REFUSAL_CODES, status 409).Tests
Teaching text only; no runtime code moves.
pnpm --filter @objectstack/spec run check:skill-examples: exit 0, 332 prose examples type-check.Acceptance notes
skills/objectstack-api/SKILL.md441 → 441 lines, 20646 → 20646 bytes, 5157 → 5157 tokens (ceiling 6314). Whole pack (everySKILL.md): 4599 → 4599 lines.dispatch-gates --tiermandates the contract-review model forskills/**; this build ran on the default tier under the no-Fable-build exit, and the contract review runs on the lane's isolated reviewer.permanent: trueis an engine option only), so the skill teaches none.Verification
Derived gates (46) on 7d3edcd
45 exit 0.
pnpm check:dual-build-cjs-loadsexit 3 (PREREQUISITE NOT MET, needs every package's dist): NOT MEASURED, left to CI.dispatch-gates --ran: 46 accounted, 45 run, 1 NOT-MEASURED. The merge oforigin/main(head 4efbaef) brought 6 commits touching no file of this diff;check-skills-token-ratchetre-run on 4efbaef: exit 0.🤖 Generated with Claude Code
Generated by Claude Code