Repository navigation
feat: OpenOptions::allow_overrides gate (#869) - #873
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QoYX6tc5G3sKVzvLjD
Overridable (MaxDerivedFacts, MaxResults; DEFAULTS allows both) lists the query keywords that may override a database's settings. A query using an unlisted keyword is refused with API-025 after parsing, from execute, query, prepare and WriteTransaction::execute. BrowserDb uses DEFAULTS. Adds docs/CONFIGURATION.md. Refs #869, #862 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QoYX6tc5G3sKVzvLjD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QoYX6tc5G3sKVzvLjD
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Refs #869, #862
Implements the
allow_overridesgate from the #862 spec (§1, §2), followingdocs/superpowers/plans/2026-11-06-869-allow-overrides.md(in this PR).What changes
minigraf::Overridable(new,#[non_exhaustive]):MaxDerivedFacts,MaxResults;DEFAULTSlists both;keyword().OpenOptions::allow_overrides: field + builder that replaces the list (defaultDEFAULTS.to_vec()). Not stored in the file.Minigraf::execute,query,prepare(noPreparedQueryis returned) andWriteTransaction::execute(transaction stays usable). Keywords are checked in a fixed order; the first refused is reported.execute/query/preparecheck againstDEFAULTS(it takes no options), so no behavior change there today; Add :query-memory-limit, bind slots on limit keywords and PreparedQuery limit setters #870's gated keyword will be refused there without further changes.docs/CONFIGURATION.md(settings table, planned rows marked Add :query-memory-limit, bind slots on limit keywords and PreparedQuery limit setters #870/Per-transaction synchronous and chunk size: TxOptions and begin_write_with #871/Make the recursion round limit (max_iterations) configurable per query and in OpenOptions #861), linked from README; ERROR_REFERENCE, CHANGELOG, TEST_COVERAGE, CLAUDE.md. ROADMAP doesn't list Audit which OpenOptions settings should be overridable per query (and which already are) #862, so it isn't changed.The default list allows every keyword that worked before, so no existing query changes.
Tests
tests/allow_overrides_test.rs(6): defaults, empty list at all four entry points, replace semantics, refused tx statement leaves tx usable,DEFAULTSread-back/chain/duplicates, file DB not persisted.src/overrides.rs(2 unit): check order, pass cases. 1 doc test onOpenOptions::allow_overrides. 1wasm_bindgen_test(BrowserDb defaults).test-hooks2,085 / 24; 0 failures (+9 native tests).cargo clippy --all-features -D warningsclean; wasm32 browser lib + unit tests build.Size
--profile dist: 1,260,848 → 1,263,256 B (+2,408 B), 360 B under the 1,234 KiB gate.Review
Codex (
gpt-6-astra) was skipped: usage limit until 2026-11-11.Docs site: project-minigraf/minigraf-docs PR to follow (merge after this one).
🤖 Generated with Claude Code
https://claude.ai/code/session_01H2a7QoYX6tc5G3sKVzvLjD