Repository navigation
feat(store): editable/deletable states and unique values across owners (#952, #953) - #984
Merged
Merged
Conversation
#952, #953) editable and deletable, in the shape of a transition's from (a value or a list per readOnly property), refuse PUT/PATCH and DELETE outside the named states with 409 record_locked, under the write lock after If-Match, on HTTP, StoreExports and host transactions. Creates, transitions, increments and transfers are unaffected. Allow on a record and allow on a list are the hint. unique: [prop] keeps a bounded string property unique across every record, across owners on an owned collection, with 409 value_taken through a partial expression index; activation refuses stored duplicates. Documented as an existence oracle: public handles only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 29, 2026 22:06
…enerate references Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
added a commit
that referenced
this pull request
Sep 29, 2026
…0 ms (#985) The body-validation limits test bounded a 100,000-character check at 50 ms; it failed once under load (PR #984's verify). It now asserts the outcome: only the maxLength issue, so the pattern is never evaluated. Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #952
Fixes #953
From the third agent trial (#961).
#952: edit and delete states
from, but each property takes a value or a list of values. Each property must be inreadOnlyProperties, so a body can't move a record into or out of a state. Each value is checked against its property's schema. Both keys are refused on membership andreadOnlycollections.409 record_lockedand writes nothing. The check runs inside the write'sBEGIN IMMEDIATEtransaction, after the scope check (404) andIf-Match(412). It covers HTTP PUT/PATCH/DELETE,StoreExports.update, and a host transaction'supdate/remove, which roll back the whole transaction.readOnlyProperties. Transitions, increments, transfers and the operator'sownerless-deleteare also unaffected.Allowwith the methods the record accepts now. A collection-mount list carriesallow: {<id>: [methods]}next tomay.#953: unique values across owners
unique: [handle]takes up to 4 string properties. Each must havemaxLengthat most 128, no default, not be readOnly, not be the key, and not be set by a transition.keystays refused there, and its message now points tounique.409 value_taken. The one issue it returns names the property, never the value or who holds it.store_unique_*). Activation builds the index and drops it once no live declaration names it. The stale-index cleanup is now shared with intervals.pattern, and throttle the mount.Also
record_locked(naming the states),value_taken, theAllowheader and the list'sallow.editable,unique), README, docs/STORE.md, FRAMEWORK.md, CHANGELOG, SECURITY.md, llms.txt and llms-full.txt.Evidence
packages/store/test/state-gates.test.ts(8 tests), covering:npm run verifypassed except one timing flake:test/body-validation-limits.test.ts, a 50 ms ReDoS bound under load. That test passed in the first verify run and on 3 isolated reruns, andverify:workspaceswas then rerun green.npm run test:packagepassed.Limitations: not an independent security review. Uniqueness is exact-match only, so look-alike handles are the author's
patternto prevent.🤖 Generated with Claude Code