Skip to content

Commit c84be13

Browse files
authored
fix(holoindex): restore truthful RedDog query boundary
Merge PR #1282: canonical HoloIndex truth boundary, serialized RedDog owner, governed maintenance, WSP evidence, and CodeQL log-redaction fix.
2 parents 69b0ccf + 0fbc55a commit c84be13

107 files changed

Lines changed: 18765 additions & 1256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,31 @@ HOLO_DISABLE_PIP_INSTALL=false
5454
HOLO_BREADCRUMB_ENABLED=true
5555
HOLO_BREADCRUMB_LOGS=true
5656
HOLO_REWARD_VARIANT=A
57+
# Canonical HoloIndex store (legacy HOLO_SSD_PATH remains supported during migration)
58+
HOLOINDEX_SSD_PATH=E:/HoloIndex
5759
HOLO_SSD_PATH=E:/HoloIndex
5860
HOLO_CACHE_PATH=E:/HoloIndex/cache
5961
HOLO_MODEL_ROOT=E:/HoloIndex/models
6062

63+
# The supported RedDog adapter queries a host-owned service at literal
64+
# 127.0.0.1. This application boundary exposes no indexing API; it is not an
65+
# operating-system privilege boundary. Deploy worker processes under an OS
66+
# identity without write access to the canonical store when hard isolation is
67+
# required.
68+
# For an externally supervised owner, generate a token of at least 32
69+
# characters outside the repository and set the same value in the owner and
70+
# worker environments before enabling the URL. Automatic startup instead uses
71+
# an ephemeral process-private handoff and never exports its token here or to
72+
# the parent environment.
73+
# HOLOINDEX_QUERY_SERVICE_URL=http://127.0.0.1:8127
74+
# HOLOINDEX_QUERY_SERVICE_TOKEN=
75+
# Trusted-host RedDog lifecycle: auto-start and exact-HEAD refresh are enabled
76+
# for autonomous/headless work. The supported worker adapter has no maintenance
77+
# surface; filesystem/process rights must be restricted separately by the host.
78+
REDDOG_HOLOINDEX_OWNER_AUTO_START=1
79+
REDDOG_HOLOINDEX_AUTO_MAINTENANCE=1
80+
REDDOG_HOLOINDEX_MAINTENANCE_TIMEOUT_SECONDS=1800
81+
6182
# Central local model routing (single source of truth for local LLM files)
6283
# Model root with role-based folders:
6384
# triage -> gemma-270m

ModLog.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# FoundUps Agent - Development Log
22

3+
## [2026-07-18] HoloIndex / RedDog Operational Truth Boundary POC Phase 1
4+
5+
**WSP Protocol**: WSP 00, 05, 06, 15, 22, 34, 50, 62, 64, 81, 84, 87, 96, 97
6+
**Phase**: Cross-module POC implementation complete; publication pending
7+
**Agent**: 0102 architect for 012 with delegated audit/test workers
8+
9+
**Changes**:
10+
11+
- Established one canonical HoloIndex storage, maintenance-lease, invalidation,
12+
exact-HEAD receipt, and seven-collection complete source-scope contract.
13+
- Added semantic-only trusted full maintenance and a literal-127.0.0.1 bearer query
14+
owner with process-private handoff, authenticated health canary, generation
15+
binding, and timeout poisoning.
16+
- Wired interactive/headless RedDog and startup maintenance dispatch to fail
17+
closed before Holo-dependent worker execution.
18+
- Corrected incremental, malformed-registry, scoped/capped source, linked
19+
worktree, direct-adapter, and downstream freshness truth boundaries.
20+
- Replaced caller-controlled HoloIndex timeout/exception log text with stable
21+
redacted codes after the PR CodeQL gate identified two high-severity flows.
22+
- Added the WSP_97 high-risk assumption audit, WSP_15 P0 record, module
23+
ROADMAP/TestModLogs, operator runbook, and machine contract.
24+
25+
**Impact**: The migrated RedDog POC consumers can consume generation-bound
26+
semantic repository evidence without opening Chroma through the supported
27+
adapter. HoloIndex writes remain a separate trusted-host authority; startup may
28+
route maintenance requests through governed WRE dispatch. OS privilege
29+
isolation and the legacy foundups_mcp_bridge `holo_tools.py` direct-store path
30+
remain outside this claim. This is a prerequisite for governed FoundUp
31+
build/repair recursion, not a claim of unrestricted production autonomy.
32+
33+
**WSP Compliance**: Work was isolated from concurrent lanes in a dedicated Git
34+
worktree and focused branch; no framework WSP or knowledge mirror changed.
35+
MODULE_CONCATENATION_GATE.md remains correctly unmirrored because it is a
36+
non-protocol quick reference. The final HoloIndex matrix passed 346 tests, the
37+
final non-overlapping focused matrices passed 745 tests, the independent
38+
boundary/security review passed 289 tests, all 81 changed or added Python files
39+
compiled, WSP_00 remained green, and the WSP_97 structural receipt validated.
40+
PR evidence and clean-main post-merge activation remain pending.
41+
342
## [2026-07-04] docs(audit): RedDog FoundUp creation path audit + WSP_109 slice ordering (0102 architect, WSP_97)
443

544
**Change Type**: DECISION_ONLY_DOCS — audit record and slice specs; no runtime mutation.

docs/audits/infrastructure/HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1.md

Lines changed: 159 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"execution_id": "HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1",
3+
"execution_plane": "wre_runtime",
4+
"outcome": "completed",
5+
"action_evidence": {
6+
"retrieve_wsps": [
7+
"HoloIndex was queried before implementation in offline lexical diagnostic mode; authoritative framework WSP files were then read directly.",
8+
"WSP_framework/src/WSP_00_Zen_State_Attainment_Protocol.md",
9+
"WSP_framework/src/WSP_15_Module_Prioritization_Scoring_System.md",
10+
"WSP_framework/src/WSP_62_Large_File_and_Refactoring_Enforcement_Protocol.md",
11+
"WSP_framework/src/WSP_96_WRE_Skills_Wardrobe_Protocol.md",
12+
"WSP_framework/src/WSP_97_WSP_CODING_AGENTS_SYSTEM.md"
13+
],
14+
"retrieve_evidence": [
15+
"docs/audits/infrastructure/HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1.md",
16+
"holo_index/docs/HOLO_INDEX_MACHINE_LANGUAGE_SPEC_0102.json",
17+
"modules/infrastructure/foundups_mcp_bridge/HOLO_QUERY_OWNER_RUNBOOK.md"
18+
],
19+
"research": [
20+
"Audited canonical storage, receipt freshness, semantic backend, linked-worktree HEAD, RedDog startup, and downstream worker paths.",
21+
"Verified the cached sentence-transformers artifact loads offline at dimension 384 and bound its content fingerprint to all baseline collections.",
22+
"Compared framework WSP authority with knowledge backups; no WSP or backup was modified."
23+
],
24+
"micro_pass": [
25+
"Focused regressions cover malformed and duplicate receipts, model/runtime fingerprint mismatch, owner poisoning, redirect/proxy denial, response-body timeout, and repository races.",
26+
"modules/infrastructure/foundups_mcp_bridge/tests",
27+
"holo_index/tests/test_holoindex_embedding_space.py"
28+
],
29+
"macro_pass": [
30+
"Final no-overlap focused validation: 745 passed across HoloIndex, infrastructure owner, RedDog query/downstream, and idle-maintenance matrices.",
31+
"Final HoloIndex validation: 346 passed across storage/source/CLI/embedding, freshness/maintenance, incremental/work-ledger, and machine-contract matrices.",
32+
"Independent owner/client/maintenance/security validation: 289 passed.",
33+
"All 81 changed or added Python files compiled without writing bytecode."
34+
],
35+
"hard_think": [
36+
"docs/audits/infrastructure/HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1.md#3-failure-modes",
37+
"Separated response-body absolute deadlines from the documented trusted cooperative loopback-header assumption.",
38+
"Rejected legacy receipts and stores without generation and embedding-space fingerprints."
39+
],
40+
"dialectic_sweep": [
41+
"docs/audits/infrastructure/HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1.md#4-alternatives-considered",
42+
"Adversarial reviewers tested false-CURRENT paths, stale owner generations, cross-lane repository changes, malformed scope, and duplicate collection entries."
43+
],
44+
"first_principles": [
45+
"One canonical writer, one serialized semantic owner, exact repository identity, exact seven-collection scope, and fail-closed freshness are the minimum truthful POC boundary.",
46+
"docs/audits/infrastructure/HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1.md#5-decision-record"
47+
],
48+
"execute": [
49+
"holo_index/storage_contract.py",
50+
"holo_index/freshness_receipt.py",
51+
"holo_index/embedding_space.py",
52+
"modules/infrastructure/foundups_mcp_bridge/src/holo_query_service.py",
53+
"modules/communication/moltbot_bridge/src/reddog_holoindex_owner_query_client.py"
54+
]
55+
},
56+
"wsps_applied": [
57+
"WSP_00",
58+
"WSP_05",
59+
"WSP_06",
60+
"WSP_15",
61+
"WSP_22",
62+
"WSP_34",
63+
"WSP_50",
64+
"WSP_62",
65+
"WSP_64",
66+
"WSP_81",
67+
"WSP_84",
68+
"WSP_87",
69+
"WSP_96",
70+
"WSP_97"
71+
],
72+
"compliance_evidence": [
73+
"Dedicated worktree and branch: fix/holoindex-reddog-poc-phase1.",
74+
"No framework WSP or knowledge-backup file changed.",
75+
"MODULE_CONCATENATION_GATE.md remains unmirrored because it is an annex, not a WSP.",
76+
"docs/audits/infrastructure/HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1.md",
77+
"holo_index/tests/TESTModLog.md",
78+
"modules/infrastructure/foundups_mcp_bridge/tests/TestModLog.md",
79+
"modules/communication/moltbot_bridge/tests/TestModLog.md"
80+
]
81+
}

holo_index/INTERFACE.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,27 @@ holo = HoloIndex(ssd_path="E:/HoloIndex", quiet=True)
3232
results = holo.search("send chat message", limit=5, doc_type_filter="all")
3333
```
3434

35+
Storage resolution is deterministic:
36+
37+
1. explicit ssd_path / --ssd
38+
2. HOLOINDEX_SSD_PATH
39+
3. legacy HOLO_SSD_PATH
40+
4. platform-safe absolute default
41+
42+
HOLOINDEX_QUERY_READONLY=1 requires an existing
43+
vectors/chroma.sqlite3, never creates directories or collections, and never
44+
writes the repository activity log. Storage failures raise
45+
HoloIndexStorageError with one of the stable codes
46+
HOLOINDEX_STORAGE_UNAVAILABLE, HOLOINDEX_STORAGE_NOT_WRITABLE,
47+
HOLOINDEX_STORAGE_PATH_MISMATCH, or HOLOINDEX_COLLECTION_UNAVAILABLE.
48+
ChromaDB itself is not a read-only database client. The supported RedDog
49+
operational adapter uses the host-owned service at literal `127.0.0.1`, as
50+
documented by modules/infrastructure/foundups_mcp_bridge/INTERFACE.md. This
51+
adapter boundary is not an OS privilege boundary; host deployment must enforce
52+
filesystem/process permissions separately when required. Legacy consumers,
53+
including foundups_mcp_bridge `holo_tools.py`, remain outside this Phase-1
54+
migration and may still open the store directly.
55+
3556
Search response contract:
3657
```python
3758
{
@@ -92,6 +113,29 @@ holo.index_test_registry()
92113
holo.index_skillz_entries()
93114
```
94115

116+
Each indexing method returns IndexResult. A zero/invalid test registry does
117+
not reset navigation_tests. The canonical
118+
WSP_knowledge/WSP_Test_Registry.json envelope is read from its tests list;
119+
legacy mapping-only registries remain supported during migration. Any
120+
malformed row in a mixed registry fails the result before embeddings or reset;
121+
it cannot be silently filtered from a complete proof.
122+
123+
Scoped maintenance receipts must name only successfully refreshed
124+
collections. Untouched collection proof is carried forward with its original
125+
repository SHA, or marked UNVERIFIED when no prior proof exists.
126+
127+
Mutation owners use MaintenanceSession (CLI) or the incremental executor to
128+
prove a clean Git worktree, acquire the canonical cross-process lease, and
129+
publish atomic IN_PROGRESS invalidation before collection access. Final PASS
130+
requires the same clean HEAD, exact declared collection scope, non-empty
131+
manifests, the canonical source_scope_id for every baseline collection, zero
132+
recorded source-read, cap, or Python-AST failures, and a durable atomic receipt
133+
write. Canonical proofs cover Git-tracked sources and full raw source content.
134+
They do not assert zero failures for every legacy format parser. Query
135+
consumers fail closed
136+
with HOLOINDEX_MAINTENANCE_ACTIVE or
137+
HOLOINDEX_MAINTENANCE_LOCK_UNPROVEN.
138+
95139
### Module Compliance Helper
96140
```python
97141
status = holo.check_module_exists("modules/communication/livechat")
@@ -125,10 +169,23 @@ python holo_index.py --search "query" --fast-search
125169
python holo_index.py --index-all
126170
python holo_index.py --index-code
127171
python holo_index.py --index-wsp
172+
python holo_index.py --index-tests
128173
python holo_index.py --index-symbols --symbol-roots modules/foundups
129174
python holo_index.py --index-skillz
130175
```
131176

177+
--index is an exact alias for --index-all. The baseline set is code, symbols,
178+
WSP, tests, skills, docs, and knowledge. Work-ledger and CLI-catalog
179+
generation remain explicit targeted operations and are not implied by
180+
--index-all.
181+
182+
Canonical --index-all fixes its symbol roots to modules, scripts, and
183+
holo_index; its WSP root to WSP_framework/src; and its web root/extensions to
184+
the versioned source-scope contract. Scoped roots, file/entry caps, disabled
185+
web indexing, or unreadable sources are diagnostic/incomplete and cannot
186+
publish CURRENT baseline proof. Semantic backend initialization is required
187+
before any baseline collection reset.
188+
132189
### Machine Bundle Output
133190
```bash
134191
python holo_index.py --bundle-json --search "task" --bundle-module-hint modules/foundups/agent_market
@@ -157,9 +214,15 @@ python holo_index.py --health-check
157214
- `HOLO_SKIP_MODEL=1`: force lexical retrieval path.
158215
- `HOLO_MIN_SIMILARITY=0.35`: vector hit floor.
159216
- `HOLO_FAST_SEARCH=1`: retrieval-only fast path.
160-
- `HOLO_INDEX_WEB=1`: include web assets during `--index-code`.
217+
- `HOLO_INDEX_WEB=1`: include web assets during a targeted diagnostic
218+
`--index-code`; trusted baseline maintenance uses the canonical tracked web
219+
scope and does not accept this override.
161220
- `HOLO_SYMBOL_AUTO=1`: auto symbol indexing during `--index-code`.
162221

222+
- HOLOINDEX_SSD_PATH: canonical persistent store root.
223+
- HOLO_SSD_PATH: legacy store-root alias, lower precedence.
224+
- HOLOINDEX_QUERY_READONLY=1: fail-closed query posture; no HoloIndex maintenance writes.
225+
163226
## Internal CLI Module Layout
164227

165228
The monolithic `cli.py` has been restructured into a package:

holo_index/ModLog.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,66 @@
11
# HoloIndex Package ModLog
22

3+
## [2026-07-18] HOLOINDEX_REDDOG_OPERATIONAL_TRUTH_BOUNDARY_POC_PHASE1
4+
5+
**WSP Protocol**: WSP 00, 05, 06, 15, 22, 34, 50, 62, 64, 84, 87, 96, 97
6+
**Phase**: POC implementation complete; focused validation green; PR checks pending
7+
**Agent**: 0102 architect for 012 with delegated audit/test workers
8+
9+
**Changes**:
10+
11+
- ADD canonical storage resolution and typed failure codes; read-only
12+
initialization no longer creates paths, collections, or repository logs.
13+
- FIX canonical test-registry indexing and expose --index-tests; --index and
14+
--index-all now select the same seven-collection baseline without implicitly
15+
generating CLI catalogs or work-ledger state.
16+
- ADD clean-repository proof, cross-process maintenance lease, atomic
17+
IN_PROGRESS invalidation, and same-HEAD final PASS publication. Incomplete
18+
CLI plans and receipt failures exit nonzero and leave invalid proof in place.
19+
- BIND every baseline collection to a versioned canonical source_scope_id.
20+
Canonical proof includes Git-tracked sources, full raw-content manifests,
21+
and zero recorded source-read, cap, or Python-AST failures; scoped
22+
diagnostics cannot publish CURRENT. No blanket all-parser claim is made.
23+
- REQUIRE semantic backend initialization before baseline collection reset.
24+
- BIND PASS receipts to each collection's backend, logical model, and
25+
deterministic local-artifact embedding_space_fingerprint; canonical
26+
maintenance rejects lexical, quantized-only, legacy blank, and mixed-space
27+
proof.
28+
- FIX offline Hugging Face snapshot discovery (models--.../snapshots/<rev>)
29+
with refs/main selection and complete-artifact checks. Model/import timeout
30+
helpers now return promptly instead of waiting during executor shutdown.
31+
- REDACT timeout/dependency/failure diagnostics to stable codes and exception
32+
class names; caller-controlled query, path, hint, and exception text is never
33+
written to the timeout-wrapper log.
34+
- HARDEN the resident RedDog owner by forcing fp32 routing, disabling the
35+
generation-unbound SearchCache, comparing all seven live/reported
36+
collection_embedding_space_map values, and poisoning a backend that sees a
37+
different receipt generation.
38+
- ADD owner-only strict-semantic execution: collection count/query failures,
39+
missing models, and encoding failures reject the request; lexical and
40+
symbol/rg augmentation remain available only to non-owner diagnostics.
41+
- FIX scoped freshness so untouched proof retains its original SHA or becomes
42+
UNVERIFIED instead of being restamped current.
43+
- UPGRADE the FoundUp incremental executor to receipt schema v2: exact-path
44+
legacy cleanup, deterministic AST symbol records, exact collection scope,
45+
partial-mutation truth, and mandatory lease/invalidation. Snapshot-only
46+
output now remains invalid and returns proof failure instead of APPLIED.
47+
- UPDATE machine/human contracts for the supported RedDog owner-adapter
48+
boundary, explicitly separate from OS privilege isolation.
49+
- HoloIndex was queried before implementation in offline lexical mode. The
50+
lexical result was retained as an index-gap signal and not claimed as
51+
semantic evidence. No WSP framework file or knowledge backup was changed.
52+
53+
**Impact**: Trusted-host maintenance can prove an exact canonical generation
54+
while the migrated RedDog adapter remains query-only. OS isolation and legacy
55+
direct-store consumers remain outside that claim. Malformed, narrowed, capped,
56+
lexical, dirty, raced, and snapshot-only paths cannot claim operational
57+
freshness through the migrated boundary.
58+
59+
**WSP Compliance**: New helpers meet focused WSP_62 thresholds; exact temporary
60+
exemptions and ROADMAP remediation cover inherited monolith debt. The final
61+
HoloIndex matrix passed 346 tests, changed Python compiled, and the WSP_97
62+
assumption audit and WSP_15 P0 score are recorded in the cross-module audit.
63+
364
## [2026-07-16] HOLOINDEX_MEMEX_PER_TARGET_RETRIEVAL_VERDICT_PHASE1
465

566
**Agent**: 0102 (Codex) | Commander: 012 | Gate: implementation slice

0 commit comments

Comments
 (0)