From 1e20a71ac737d586ed69e6a5a641605e53b5311e Mon Sep 17 00:00:00 2001 From: zlareb1 Date: Sat, 5 Dec 2026 01:17:10 +0000 Subject: [PATCH 1/2] List the worker copy read gate's broad handlers and regenerate the statement shapes The read gate's two new broad handlers admit no copy when a check cannot be read, so they are fail-closed sites with nothing to note. The read gate's source query now selects owner_subject, so its recorded statement shape changes. Co-Authored-By: Claude Opus 5.5 Signed-off-by: zlareb1 --- tests/analyzer/shapes.txt | 2 +- tests/unit/degraded_unnoted.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/analyzer/shapes.txt b/tests/analyzer/shapes.txt index 236c1044d3..c4a8edbace 100644 --- a/tests/analyzer/shapes.txt +++ b/tests/analyzer/shapes.txt @@ -574,6 +574,7 @@ 40dfbf0248ef SELECT namespace, source_uri, chunk_idx, doc_version, JSONExtractUInt(chunk_metadata, ?) AS revision, content, context, tags, chunk_metadata, ingested_at, agent, session_id, toString(source_class) AS 40e24f5cf835 SELECT e.memory_key AS memory_key, e.memory_type AS memory_type, e.content_excerpt AS content_excerpt, e.status AS status, e.version AS version, -- The content hash, for the read receipt of a hit this 4113c01ac87f SELECT memory_key, count() AS matches FROM (SELECT tm.memory_key FROM loom.entity_triple_memories AS tm INNER JOIN loom.entity_triples AS t ON t.org = tm.org AND t.namespace = tm.namespace AND t.subje +413546300ccb SELECT namespace, name, credential_mode, toString(source_id) AS source_id, owner_subject FROM loom.knowledge_sources FINAL WHERE org = {org:String} AND namespace IN {names:Array(String)} AND active AN 413b4ddac97c SELECT pr_number, merge_sha, payload, sections, built_at, indexed_commit, tokens, build_ms FROM loom.code_review_briefs FINAL WHERE org = {org:String} AND namespace = {ns:String} AND tombstoned_at IS 415f2e580ed9 SELECT * FROM loom.service_accounts FINAL WHERE org = {org:String} AND (created_by = {by:String} OR has(lineage, {by:String})) AND NOT hasAll(lineage, {above:Array(String)}) AND (expires_at IS NULL OR 4162e2756b17 ALTER TABLE loom.memory_term_freq DELETE WHERE (org = {org:String} AND namespace = {ns:String}) AND ({erasure_mutation_tag:String} = {erasure_mutation_tag:String}) SETTINGS mutations_sync = ? @@ -825,7 +826,6 @@ 5b39f4c73106 SELECT memory_key, record_json, created_at, (memory_key, identity_agent, user_id, session_id) IN ( SELECT memory_key, agent, user_id, session_id FROM loom.memory FINAL WHERE org = {org:String} AND nam 5b4266159703 SELECT e.memory_key AS memory_key, e.memory_type AS memory_type, e.content_excerpt AS content_excerpt, e.status AS status, e.version AS version, cosineDistance(e.embedding, {q:Array(Float32)}) AS dist 5b82b22d8ce2 SELECT namespace, source_uri FROM loom.documents FINAL WHERE org = {org:String} AND (namespace, source_uri) IN {pairs:Array(Tuple(String, String))} LIMIT {limit:UInt32} -5b96b3ab8467 SELECT namespace, name, credential_mode, toString(source_id) AS source_id FROM loom.knowledge_sources FINAL WHERE org = {org:String} AND namespace IN {names:Array(String)} AND active AND access = ? AN 5b9b9bcb4313 SELECT symbol_id, qualified_name, path, fan_in_calls, fan_in_nontest, fan_in_name, caller_files, defined_files, is_test FROM loom.code_symbol_stats FINAL WHERE org = {org:String} AND namespace = {ns:S 5bcdfad6f454 SELECT e.memory_key AS memory_key, e.memory_type AS memory_type, e.content_excerpt AS content_excerpt, e.status AS status, e.version AS version, cosineDistance(e.embedding, {q:Array(Float32)}) AS dist 5c174b8803f6 SELECT concat(?, toString(c.session_id), ?, toString(c.chunk_index)) AS memory_key, ? AS memory_type, substring(c.content, ?, ?) AS content_excerpt, c.content AS content_full, c.agent AS agent, c.user diff --git a/tests/unit/degraded_unnoted.txt b/tests/unit/degraded_unnoted.txt index 605a72dfff..6ee483c177 100644 --- a/tests/unit/degraded_unnoted.txt +++ b/tests/unit/degraded_unnoted.txt @@ -136,6 +136,8 @@ server/knowledge/app/restore.py::_purge_found::1 server/knowledge/app/source_access.py::ReadPlan.check::1 fail_closed # a candidate read: its failure drops mirrored results unmarked, so degraded says nothing of what matched (document-sources.md) server/knowledge/app/source_access.py::_eligible_sources::1 fail_closed # an unverifiable crawl authority admits no mirror leg, as a refused one server/knowledge/app/source_access.py::_eligible_sources::2 fail_closed # an unverifiable connection admits no private leg, as a refused one +server/knowledge/app/source_access.py::_reader_own_subject::1 fail_closed # a reader without standing owns no worker source, so no copy is admitted +server/knowledge/app/source_access.py::_worker_copy_eligible::1 fail_closed # an unverifiable worker registration admits no copy, as a refused one server/knowledge/app/source_corpus.py::load::1 fail_closed # a candidate read: its failure drops mirrored results unmarked, so degraded says nothing of what matched (document-sources.md) server/knowledge/app/source_documents.py::chunks::1 fail_closed # an admitted document's re-read: unmarked like a candidate read, so degraded says nothing of what matched (document-sources.md) server/knowledge/app/source_documents.py::get::1 fail_closed # a candidate read: its failure drops mirrored results unmarked, so degraded says nothing of what matched (document-sources.md) From e2f06e6af0bf6e4caeb2e61c89b8d8393269534b Mon Sep 17 00:00:00 2001 From: zlareb1 Date: Sat, 5 Dec 2026 01:19:20 +0000 Subject: [PATCH 2/2] Align the new allowlist rows and name the whole worker authority check Co-Authored-By: Claude Opus 5.5 Signed-off-by: zlareb1 --- tests/unit/degraded_unnoted.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/degraded_unnoted.txt b/tests/unit/degraded_unnoted.txt index 6ee483c177..ae1ac71037 100644 --- a/tests/unit/degraded_unnoted.txt +++ b/tests/unit/degraded_unnoted.txt @@ -136,8 +136,8 @@ server/knowledge/app/restore.py::_purge_found::1 server/knowledge/app/source_access.py::ReadPlan.check::1 fail_closed # a candidate read: its failure drops mirrored results unmarked, so degraded says nothing of what matched (document-sources.md) server/knowledge/app/source_access.py::_eligible_sources::1 fail_closed # an unverifiable crawl authority admits no mirror leg, as a refused one server/knowledge/app/source_access.py::_eligible_sources::2 fail_closed # an unverifiable connection admits no private leg, as a refused one -server/knowledge/app/source_access.py::_reader_own_subject::1 fail_closed # a reader without standing owns no worker source, so no copy is admitted -server/knowledge/app/source_access.py::_worker_copy_eligible::1 fail_closed # an unverifiable worker registration admits no copy, as a refused one +server/knowledge/app/source_access.py::_reader_own_subject::1 fail_closed # a reader without standing owns no worker source, so no copy is admitted +server/knowledge/app/source_access.py::_worker_copy_eligible::1 fail_closed # unverifiable worker authority admits no copy, as a refused one server/knowledge/app/source_corpus.py::load::1 fail_closed # a candidate read: its failure drops mirrored results unmarked, so degraded says nothing of what matched (document-sources.md) server/knowledge/app/source_documents.py::chunks::1 fail_closed # an admitted document's re-read: unmarked like a candidate read, so degraded says nothing of what matched (document-sources.md) server/knowledge/app/source_documents.py::get::1 fail_closed # a candidate read: its failure drops mirrored results unmarked, so degraded says nothing of what matched (document-sources.md)