Skip to content

fix: serve internal store pages through MCP read tools (#90, #91) - #138

Merged
jflowers merged 11 commits into
unbound-force:mainfrom
jflowers:opsx/mcp-internal-store-access
Nov 2, 2026
Merged

jflowers merged 11 commits into
unbound-force:mainfrom
jflowers:opsx/mcp-internal-store-access

Conversation

@jflowers

@jflowers jflowers commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Bridged the vault read layer and the internal SQLite store so MCP read tools serve a unified, live view of vault files and internal store pages — fixing both #90 (MCP tools cannot access internal store pages) and #91 (promote fails with "Page not found" for compiled articles).

MCP read tools served only the in-memory vault index, so pages stored via store_learning/store_compiled were invisible until restart, and promote masked store errors as "not found" while CLI dewey promote hit an opaque lock error. Five coordinated changes:

  • Live store read-through in vault.Client — GetPage, GetPageBlocksTree, and GetBlock fall back to the persistent store on in-memory miss; GetAllPages, FullTextSearch, and FindBlocksByTag merge store-only pages (new store.SearchBlocksByContent) — with vault-file precedence, no mid-session caching, and byte-identical no-store parity for all 37 inherited graphthulhu tools.
  • reload keeps store pages — re-runs the external-page load so store-backed pages survive reloads instead of vanishing until restart.
  • Promote reliability (bug: dewey_promote MCP tool fails with 'Page not found' for compiled articles #91) — distinguishes lookup errors from absence and resolves agent-friendly shorthand names (gateway → compiled/gateway, then learning/).
  • CLI promote lock diagnostics — lock failures name the holding PID/command from dewey.lock and point at the MCP promote tool as the supported write path while a server runs.
  • Hardening — nil-store guard in store_compiled (was a panic path) and a shared persistent-storage error with a lock-contention hint across all seven tool sites.

Closes #90
Closes #91

How to Test

Run the #90/#91 end-to-end flow (captured as TestServerIntegration_StoreBackedPagesSameSession in server_test.go):

  1. Start dewey serve with a persistent store (--vault containing a .uf/dewey/ workspace).
  2. store_compiled(tag="gateway", ...) — store a compiled article.
  3. Same session, without restart: get_page(name="compiled/gateway"), list_pages(), search(query="gateway"), find_by_tag(tag="gateway"), and get_block(uuid=...) all return the stored content (bug: MCP tools cannot access internal store pages (learnings, compiled articles) #90 fixed).
  4. promote(page="gateway") — bare shorthand resolves to compiled/gateway and promotes it (draft → validated); a closed/failed store reports "failed to look up page" instead of "not found" (bug: dewey_promote MCP tool fails with 'Page not found' for compiled articles #91 fixed).
  5. reload — store-backed pages survive instead of disappearing until restart.
  6. While the server runs, dewey promote from a second terminal reports the holding PID/command from .uf/dewey/dewey.lock and points at the MCP promote tool.

CI parity (from .github/workflows/ci.yml): go mod download, go build -v ./..., go vet ./..., go test -race -v -count=1 -coverprofile=coverage.out ./..., gaze crap --format=json --coverprofile=coverage.out --max-crapload=48 --max-gaze-crapload=45 ./...

How to Demo

Use the How to Test sequence above as the live demo — it walks the exact failure mode reported in #90 (store → read in the same session) and #91 (promote of a stored page, plus the CLI lock diagnostic).

Key Files Changed

  • vault/vault.go (+332/-62) — read-path store fallbacks/merges, Reload preservation, tag fallback, empty-query guard
  • vault/vault_store.go (+221/-30) — GetStorePage/GetStoreBlock/ListStorePages/SearchStoreBlocks read helpers
  • store/store.go (+56) — SearchBlocksByContent parameterized block search
  • tools/promote.go (+60/-10) — error clarity, shorthand name resolution
  • tools/persistent_storage.go (new) — shared persistent-storage error with lock hint (7 call sites)
  • cli.go (+28/-1) — promote lock-holder diagnostics (reuses detectLockHolder)
  • server.go, types/tools.go — promote tool schema descriptions
  • server_test.go (+452), vault/vault_test.go (+1412), vault/vault_store_test.go (+552), store/store_test.go (+233), tools/*_test.go — full fallback/merge/promote test matrices + integration test
  • openspec/changes/mcp-internal-store-access/ — proposal, design, delta spec, tasks, completion notes
  • .uf/dewey/learnings/ (16 files) — knowledge artifacts captured during the workflow
  • README.md, AGENTS.md, specs/004-unified-content-serve/spec.md — documentation sync

Known Issues

Review council returned APPROVE WITH ADVISORIES (spec review: 1 iteration; code review: 2 iterations, all 5 reviewers approving). Recorded, non-blocking follow-ups:

  • MEDIUM — startup-hydrated pages retain in-memory precedence; re-storing a pre-existing page mid-session serves the startup copy until reload (narrower residual of bug: MCP tools cannot access internal store pages (learnings, compiled articles) #90; strict improvement over pre-change behavior).
  • MEDIUM — has_property filter over the merged set lacks an integration test (namespace and tag filters are covered).
  • LOW (9) — empty-tag guard in storePageHasTag topic branch; presence-based FTS dedupe; case-sensitivity asymmetry between fallback and in-memory lookups; structured lock-holder return instead of re-parsing; namespace constants; design.md deferral cross-ref; README tool enumeration omits get_page_blocks_tree; store-level empty-query test; concurrent-test result assertions.

This PR was generated by /uf.finale (AI-assisted).

@jflowers jflowers self-assigned this Nov 1, 2026

@jflowers jflowers left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The review council verdict is REQUEST CHANGES. GitHub does not allow the pull request owner to submit a REQUEST_CHANGES review on their own pull request, so this review is posted as a COMMENT. Treat the blocking finding below as requiring changes before merge.

Review Council: REQUEST CHANGES — 1 HIGH, 6 MEDIUM, 8 LOW

What this PR does well: store-only pages (compiled articles, learnings) become live-retrievable through the MCP read tools, promote resolves them with clear error distinction, CLI lock diagnostics improve, and the PR carries +3100 lines of tests plus complete OpenSpec artifacts. CI is green (build-and-test, MegaLinter) on the head SHA.

Why changes are requested: the Freshness guarantee is structurally scoped to pages first stored during the session — startup-hydrated pages retain in-memory precedence with no invalidation path — while the delta spec, proposal, design D2, GoDoc, test names, and the AGENTS.md line all assert the absolute claim, and the known-violating population path has no regression test. Three reviewers (architect, guard, tester) converged on this cluster from independent angles; the tester's HIGH finding is the blocking one.

Blocking (HIGH)

  • [testing] vault/vault_test.go:2707 — Freshness requirement verified on only one of two population paths: a page hydrated at startup by LoadExternalPages, then re-stored mid-session by store_compiled/store_learning (replace semantics), serves the stale hydrated copy until reload. No test covers this interleaving, while test names (RestoreIsNeverStale), code comments, and the AGENTS.md line assert an unconditional guarantee the suite does not establish. Either add the missing interleaving test and fix/scope the behavior, or narrow the spec/proposal/design/GoDoc/test-name claims to the delivered guarantee.

Advisories (MEDIUM)

  • [architect] vault/vault.go:627 / [guard] vault/vault.go:625 (shared root cause) — spec/proposal/design D2/GoDoc ship the absolute freshness claim; this PR also commits the counterexample as a learning (.uf/dewey/learnings/vault-store-bridge-20261101T183011-jay-flowers.md), so the artifacts contradict one another.
  • [guard] vault/vault.go:1908 — search merge dedupes store hits against in-memory results instead of vault-index membership: SQL LIKE substring semantics leak into results for vault pages, and stale mirrored rows can surface; the delta spec and design D4 disagree with each other.
  • [guard] vault/vault.go:612 — readOnly write guard keys on c.pages membership, which the live fallbacks deliberately bypass: same-session store-backed pages are writable, silently creating a shadow vault file that then shadows the store page; post-restart the identical write is rejected.
  • [architect] .uf/dewey/learnings/ — 16 session learnings ride into the feature PR via the staging sweep, routing around the repo's human-gated publication flow (dewey artifacts sync); the practice is undocumented in AGENTS.md.
  • [testing] server_test.go:1143 — list_pages(has_property=...) over the merged set is the only enumerated filter with zero integration coverage.

Advisories (LOW)

  • [adversary] vault/vault.go:606 — GetPage/GetPageBlocksTree store fallbacks skip the in-memory tier's strings.ToLower key normalization (exact-match SQL): wrong-case lookups differ by tier and session age.
  • [architect] vault/vault.go:1868 — FullTextSearch GoDoc over-claims "all matching blocks ... identical to a restart" under limit pressure.
  • [curator] README.md:31 — new read-tools paragraph omits get_page_blocks_tree (suggestion in inline comment).
  • [testing] vault/vault_test.go:3700 — white-box reload assertions are justified here (fallback masks the regression) but refactor-coupled.
  • [architect] tools/promote.go:110 — new hardcoded compiled/learning domain literals (CS-012).
  • [curator] tasks.md:32 — website sync issue unbound-force/website#361 filed without the conventional docs label (also #355–#357); one-line gh issue edit fix.
  • [testing] vault/vault_store.go:606 — two partial-failure branches lack coverage (needs a fault-injection seam).
  • [architect] tasks.md:18 — literal [NEEDS CLARIFICATION] marker syntax in task text (MP-005; suggestion in inline comment).

Dispatch: 5 reviewers (adversary heavy, architect/curator/guard/testing standard) — 4 APPROVE WITH ADVISORIES, 1 REQUEST CHANGES. envoy/herald/scribe skipped (content personas), sre skipped (scope miss). Manifest-delivered diff, all files reviewed.

This review was generated by /uf.review-pr (AI-assisted).

Comment thread vault/vault_test.go Resolved
Comment thread vault/vault.go Resolved
Comment thread vault/vault.go Resolved
Comment thread server_test.go Resolved
Comment thread vault/vault_test.go Resolved
Comment thread tools/promote.go Resolved
Comment thread vault/vault_store.go Resolved
@jflowers
jflowers force-pushed the opsx/mcp-internal-store-access branch from 9c7fc85 to 260043a Compare November 2, 2026 01:51
jflowers added a commit to jflowers/dewey that referenced this pull request Nov 2, 2026
Review follow-ups for the live store read-through (PR unbound-force#138):

- store: add GetPageFoldCase (COLLATE NOCASE) for ASCII case-insensitive
  page lookup, sharing a getPageWhere helper with GetPage; promote
  shorthand prefixes now use the CompiledPrefix/LearningPrefix constants
- vault: fallback lookups pass the raw name and fold case in SQL, so a
  wrong-case get_page reaches same-session store-only pages (learning
  identities carry an uppercase "T") exactly like the in-memory tier
  and post-restart hydration
- vault: page-level write tools resolve the read-only guard from the
  store (checkStoreBackedWrite/StorePageMeta) before create-if-missing,
  so store-backed pages served by the read-through cannot be shadowed
  by a silently created vault file
- vault: FullTextSearch dedupe is membership-based against the full
  in-memory index, so limit-truncated results cannot duplicate store
  hits

Addresses PR unbound-force#138 review feedback from @jflowers.

All CI-parity checks green (go build, go vet, go test -race -count=1,
gaze CRAPload 48/48, GazeCRAPload 39/45).

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit to jflowers/dewey that referenced this pull request Nov 2, 2026
Review follow-ups for the live store read-through tests (PR unbound-force#138):

- rename the same-session restore tests to scope what they pin
  (store-only re-stores), leaving hydrated-page precedence documented
- TestGetPage_FallbackFoldsCase: wrong-case get_page and
  get_page_blocks_tree reach a same-session store-only learning page
- TestWriteGuard_StoreBackedPagesRejected: append/prepend/delete/rename
  reject store-backed pages as read-only, create_page reports
  page-already-exists, and no shadow vault file appears
- TestFullTextSearch_MirroredSubstringOnlyMatchDoesNotSurface: a
  substring-only in-memory page cannot duplicate a store hit
- server_test: list_pages property filter (HasProperty "topic")
  returns exactly the compiled pages

Addresses PR unbound-force#138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit to jflowers/dewey that referenced this pull request Nov 2, 2026
Review follow-ups for the mcp-internal-store-access artifacts (PR unbound-force#138):

- README: get_page_blocks_tree joins the live read-tools list
- AGENTS.md: website sync issues carry the docs label; document the
  learnings direct-commit practice (stageable artifacts, credential
  screening, artifacts plan/sync, never force publication)
- proposal/design/delta spec: freshness claims scoped to pages first
  stored during a session; hydrated pages keep in-memory precedence
  until reload (known limitation, D2); write-guard guarantee expanded
  to the synchronous store existence check; FullTextSearch dedupe
  documented as membership-based
- completion: known limitations recorded during review (no fault
  injection for hydrateStorePage, hydrated-page re-store precedence,
  page-level write-guard scope)
- tasks: replace the [NEEDS CLARIFICATION] shorthand task with the
  resolved reviewer suggestion

Addresses PR unbound-force#138 review feedback from @jflowers.

Website sync issues unbound-force#361, unbound-force#355, unbound-force#356, unbound-force#357 labeled docs.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit to jflowers/dewey that referenced this pull request Nov 2, 2026
Add a store-package test for GetPageFoldCase: exact, lowercase-t, and
full-uppercase lookups of a learning page name (whose ISO timestamp
carries an uppercase "T") all resolve to the canonical stored name, a
truly absent name returns (nil, nil), and the exact-match GetPage keeps
its case sensitivity. The vault bridge tests exercise the fold-case path
cross-package, which left the new store API at 0% per-package coverage
attribution in the gaze pre-flight report — this closes that gap
directly.

Closes the gaze pre-flight coverage gap flagged for this review.

Addresses PR unbound-force#138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit to jflowers/dewey that referenced this pull request Nov 2, 2026
Resolve the documentation advisories from the review council
(correlation 9de24aa0-50a9-467d-9293-bf68ad8ba5a7):

- README read-tools paragraph now states which name forms store-backed
  reads accept (canonical compiled/<tag> and learning/<identity>;
  list_pages shows compiled articles under their bare topic; promote
  accepts either form) — closes the store_compiled -> list_pages ->
  get_page 'page not found' documentation gap. Same note added to
  unbound-force/website#361; behavioral follow-up filed as
  unbound-force#140.
- proposal.md capability description now names the six read tools in
  the merge and states query_properties is excluded.
- tasks.md gains the deferred query_properties/FindByProperty store
  merge as unchecked follow-up task 6.1, making design.md's 'noted in
  tasks as follow-up' cross-reference true.
- completion.md Known Limitations records the query_properties
  divergence (list_pages has_property is store-aware; FindByProperty
  is vault-file-only and session-age dependent).

Documentation-only changes, exempt from council re-review per
AGENTS.md.

Addresses PR unbound-force#138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
, unbound-force#91)

MCP read tools served only the in-memory vault index, so pages stored
via store_learning/store_compiled were invisible until restart, and
promote masked store errors as "not found" while CLI promote hit an
opaque lock error. Unify the two data layers:

- vault.Client: live store read-through — GetPage/GetPageBlocksTree/
  GetBlock fall back to the persistent store on miss; GetAllPages,
  FullTextSearch, and FindBlocksByTag merge store-only pages (new
  store.SearchBlocksByContent) with vault-file precedence, no
  mid-session caching, and byte-identical no-store parity
- Reload() re-runs LoadExternalPages so store-backed pages survive
  reloads instead of vanishing until restart
- promote: distinguishes lookup errors from absence and resolves bare
  names via compiled/ then learning/
- CLI promote: lock failure names the holding PID/command from
  dewey.lock and points at the MCP promote tool
- hardening: nil-store guard in store_compiled, shared
  persistent-storage error with lock-contention hint across tools

All 5 CI-parity checks green (1468 tests, 0 failures; gaze 46/48).
Review council: APPROVE WITH ADVISORIES (spec + code).

Assisted-by: glm-5
Generated with AI assistance (glm-5)
MegaLinter golangci-lint flagged the error string returned by
persistentStorageError for ending with punctuation (ST1005). Remove
the trailing period; all test assertions are substring-based and
unaffected.

Assisted-by: glm-5
Generated with AI assistance (glm-5)
Review follow-ups for the live store read-through (PR unbound-force#138):

- store: add GetPageFoldCase (COLLATE NOCASE) for ASCII case-insensitive
  page lookup, sharing a getPageWhere helper with GetPage; promote
  shorthand prefixes now use the CompiledPrefix/LearningPrefix constants
- vault: fallback lookups pass the raw name and fold case in SQL, so a
  wrong-case get_page reaches same-session store-only pages (learning
  identities carry an uppercase "T") exactly like the in-memory tier
  and post-restart hydration
- vault: page-level write tools resolve the read-only guard from the
  store (checkStoreBackedWrite/StorePageMeta) before create-if-missing,
  so store-backed pages served by the read-through cannot be shadowed
  by a silently created vault file
- vault: FullTextSearch dedupe is membership-based against the full
  in-memory index, so limit-truncated results cannot duplicate store
  hits

Addresses PR unbound-force#138 review feedback from @jflowers.

All CI-parity checks green (go build, go vet, go test -race -count=1,
gaze CRAPload 48/48, GazeCRAPload 39/45).

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
Review follow-ups for the live store read-through tests (PR unbound-force#138):

- rename the same-session restore tests to scope what they pin
  (store-only re-stores), leaving hydrated-page precedence documented
- TestGetPage_FallbackFoldsCase: wrong-case get_page and
  get_page_blocks_tree reach a same-session store-only learning page
- TestWriteGuard_StoreBackedPagesRejected: append/prepend/delete/rename
  reject store-backed pages as read-only, create_page reports
  page-already-exists, and no shadow vault file appears
- TestFullTextSearch_MirroredSubstringOnlyMatchDoesNotSurface: a
  substring-only in-memory page cannot duplicate a store hit
- server_test: list_pages property filter (HasProperty "topic")
  returns exactly the compiled pages

Addresses PR unbound-force#138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
Review follow-ups for the mcp-internal-store-access artifacts (PR unbound-force#138):

- README: get_page_blocks_tree joins the live read-tools list
- AGENTS.md: website sync issues carry the docs label; document the
  learnings direct-commit practice (stageable artifacts, credential
  screening, artifacts plan/sync, never force publication)
- proposal/design/delta spec: freshness claims scoped to pages first
  stored during a session; hydrated pages keep in-memory precedence
  until reload (known limitation, D2); write-guard guarantee expanded
  to the synchronous store existence check; FullTextSearch dedupe
  documented as membership-based
- completion: known limitations recorded during review (no fault
  injection for hydrateStorePage, hydrated-page re-store precedence,
  page-level write-guard scope)
- tasks: replace the [NEEDS CLARIFICATION] shorthand task with the
  resolved reviewer suggestion

Addresses PR unbound-force#138 review feedback from @jflowers.

Website sync issues unbound-force#361, unbound-force#355, unbound-force#356, unbound-force#357 labeled docs.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
Add a store-package test for GetPageFoldCase: exact, lowercase-t, and
full-uppercase lookups of a learning page name (whose ISO timestamp
carries an uppercase "T") all resolve to the canonical stored name, a
truly absent name returns (nil, nil), and the exact-match GetPage keeps
its case sensitivity. The vault bridge tests exercise the fold-case path
cross-package, which left the new store API at 0% per-package coverage
attribution in the gaze pre-flight report — this closes that gap
directly.

Closes the gaze pre-flight coverage gap flagged for this review.

Addresses PR unbound-force#138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
Resolve the documentation advisories from the review council
(correlation 9de24aa0-50a9-467d-9293-bf68ad8ba5a7):

- README read-tools paragraph now states which name forms store-backed
  reads accept (canonical compiled/<tag> and learning/<identity>;
  list_pages shows compiled articles under their bare topic; promote
  accepts either form) — closes the store_compiled -> list_pages ->
  get_page 'page not found' documentation gap. Same note added to
  unbound-force/website#361; behavioral follow-up filed as
  unbound-force#140.
- proposal.md capability description now names the six read tools in
  the merge and states query_properties is excluded.
- tasks.md gains the deferred query_properties/FindByProperty store
  merge as unchecked follow-up task 6.1, making design.md's 'noted in
  tasks as follow-up' cross-reference true.
- completion.md Known Limitations records the query_properties
  divergence (list_pages has_property is store-aware; FindByProperty
  is vault-file-only and session-age dependent).

Documentation-only changes, exempt from council re-review per
AGENTS.md.

Addresses PR unbound-force#138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
Store the seven lesson proposals harvested from the review council
dispatch (correlation 9de24aa0-50a9-467d-9293-bf68ad8ba5a7) to
.uf/dewey/learnings/ per the AGENTS.md learnings direct-commit
practice: TOCTOU guard residual, bridge-layer drift audit, NOCASE
ASCII-only vs ToLower Unicode parity, name-form docs asymmetry,
write-guard source predicate scope, guard error-path fault injection,
and silently re-targeted tests. Credential-screened before staging.
The repo .gitignore does not exclude these; a local .git/info/exclude
entry does, so the files are added deliberately with -f.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers force-pushed the opsx/mcp-internal-store-access branch from 4ba57bb to 0f06ea4 Compare November 2, 2026 19:33
The Gaze threshold gate failed CI with CRAPload 49/48 after the
store-backed write guards added complexity to (*Client).DeletePage
(13.28 -> 16.30) and (*Client).RenamePage (12.54 -> 15.20). Add the
missing test coverage for both: subdirectory deletion with empty-parent
cleanup (and retention when a sibling page remains), plus over-length
and nonexistent-page rename validation. Post-fix: DeletePage 12.38,
RenamePage 13.93, CRAPload 46/48.
Address review-council iteration-2 findings on the write guard:

- Add TestWriteGuard_StoreErrorSurfaces: with the store closed, guarded
  writes surface the lookup error instead of falling through to
  create-if-missing (no shadow file is created).
- Add TestWriteGuard_StaleDiskLocalRowBlocksCreate: a stale disk-local
  store row with no in-memory entry and no vault file makes CreatePage
  fail with "page already exists" while list_pages never shows the
  name - pinning the guard's fail-closed breadth with the reindex
  recovery path.
- Rename TestFindBlocksByTag_StoreListError to
  TestFindBlocksByTag_StorePagesListError now that the fallback lists
  all store pages, and assert the "list store pages for tag search"
  error wrap.
@jflowers
jflowers merged commit d55ed00 into unbound-force:main Nov 2, 2026
2 checks passed
jflowers added a commit that referenced this pull request Nov 2, 2026
Review follow-ups for the live store read-through (PR #138):

- store: add GetPageFoldCase (COLLATE NOCASE) for ASCII case-insensitive
  page lookup, sharing a getPageWhere helper with GetPage; promote
  shorthand prefixes now use the CompiledPrefix/LearningPrefix constants
- vault: fallback lookups pass the raw name and fold case in SQL, so a
  wrong-case get_page reaches same-session store-only pages (learning
  identities carry an uppercase "T") exactly like the in-memory tier
  and post-restart hydration
- vault: page-level write tools resolve the read-only guard from the
  store (checkStoreBackedWrite/StorePageMeta) before create-if-missing,
  so store-backed pages served by the read-through cannot be shadowed
  by a silently created vault file
- vault: FullTextSearch dedupe is membership-based against the full
  in-memory index, so limit-truncated results cannot duplicate store
  hits

Addresses PR #138 review feedback from @jflowers.

All CI-parity checks green (go build, go vet, go test -race -count=1,
gaze CRAPload 48/48, GazeCRAPload 39/45).

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit that referenced this pull request Nov 2, 2026
Review follow-ups for the live store read-through tests (PR #138):

- rename the same-session restore tests to scope what they pin
  (store-only re-stores), leaving hydrated-page precedence documented
- TestGetPage_FallbackFoldsCase: wrong-case get_page and
  get_page_blocks_tree reach a same-session store-only learning page
- TestWriteGuard_StoreBackedPagesRejected: append/prepend/delete/rename
  reject store-backed pages as read-only, create_page reports
  page-already-exists, and no shadow vault file appears
- TestFullTextSearch_MirroredSubstringOnlyMatchDoesNotSurface: a
  substring-only in-memory page cannot duplicate a store hit
- server_test: list_pages property filter (HasProperty "topic")
  returns exactly the compiled pages

Addresses PR #138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit that referenced this pull request Nov 2, 2026
Review follow-ups for the mcp-internal-store-access artifacts (PR #138):

- README: get_page_blocks_tree joins the live read-tools list
- AGENTS.md: website sync issues carry the docs label; document the
  learnings direct-commit practice (stageable artifacts, credential
  screening, artifacts plan/sync, never force publication)
- proposal/design/delta spec: freshness claims scoped to pages first
  stored during a session; hydrated pages keep in-memory precedence
  until reload (known limitation, D2); write-guard guarantee expanded
  to the synchronous store existence check; FullTextSearch dedupe
  documented as membership-based
- completion: known limitations recorded during review (no fault
  injection for hydrateStorePage, hydrated-page re-store precedence,
  page-level write-guard scope)
- tasks: replace the [NEEDS CLARIFICATION] shorthand task with the
  resolved reviewer suggestion

Addresses PR #138 review feedback from @jflowers.

Website sync issues #361, #355, #356, #357 labeled docs.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit that referenced this pull request Nov 2, 2026
Add a store-package test for GetPageFoldCase: exact, lowercase-t, and
full-uppercase lookups of a learning page name (whose ISO timestamp
carries an uppercase "T") all resolve to the canonical stored name, a
truly absent name returns (nil, nil), and the exact-match GetPage keeps
its case sensitivity. The vault bridge tests exercise the fold-case path
cross-package, which left the new store API at 0% per-package coverage
attribution in the gaze pre-flight report — this closes that gap
directly.

Closes the gaze pre-flight coverage gap flagged for this review.

Addresses PR #138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit that referenced this pull request Nov 2, 2026
Resolve the documentation advisories from the review council
(correlation 9de24aa0-50a9-467d-9293-bf68ad8ba5a7):

- README read-tools paragraph now states which name forms store-backed
  reads accept (canonical compiled/<tag> and learning/<identity>;
  list_pages shows compiled articles under their bare topic; promote
  accepts either form) — closes the store_compiled -> list_pages ->
  get_page 'page not found' documentation gap. Same note added to
  unbound-force/website#361; behavioral follow-up filed as
  #140.
- proposal.md capability description now names the six read tools in
  the merge and states query_properties is excluded.
- tasks.md gains the deferred query_properties/FindByProperty store
  merge as unchecked follow-up task 6.1, making design.md's 'noted in
  tasks as follow-up' cross-reference true.
- completion.md Known Limitations records the query_properties
  divergence (list_pages has_property is store-aware; FindByProperty
  is vault-file-only and session-age dependent).

Documentation-only changes, exempt from council re-review per
AGENTS.md.

Addresses PR #138 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers deleted the opsx/mcp-internal-store-access branch November 15, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant