Bound Ptah inference joins and atomic snapshot inserts #670

Merged
toasterson merged 1 commit from fix/ptah-bounded-rule-joins into main 2026-10-18 12:55:12 +00:00
Owner

Ptah is unready after three container OOMs at its 3 GiB limit. Its 25,883 part-of edges expand to 2,677,838 antecedent pairs after the existing noise/type guards. The rule matcher retained the complete join before consulting the 1,000-output cap, rescanning the whole graph for each partial binding. That is a reproduced unbounded allocation/CPU path consistent with the OOM/control stall; the exact live allocation stack remains unknown.

This change streams the join, uses bound subject/object/predicate indexes, enforces output limits while traversing, and shares a 100,000-candidate work budget across rules/iterations. Exhaustion explicitly reports incomplete search and never a fixpoint. Existing confidence/type/noise checks, support provenance and independently asserted-edge ownership remain covered. Task-start logging identifies future unfinished daemon work.

Ptah also logged a snapshot insert with 95,760 parameters. The atomic publisher's symbol/cognitive-table macro omitted PostgreSQL chunking. It now sizes inserts from actual entity columns while preserving SQLite's row bound and the same fenced, atomic transaction.

Validation at source commit 3d6731ce:

  • 44/44 rule tests pass, zero ignored, with ACP+daemon compilation. The regression fixture has four million possible support pairs, stops at three outputs, asserts zero whole-graph scans and real durable provenance. Rejected joins, shared budget and global output cap are covered.
  • Generated PostgreSQL SQL regression: 1/1 pass. Existing disposable SQLite publication-contention test: 1/1 pass. Both zero ignored.
  • Separate large-branch fixture: 48,332,800-byte peak RSS, 19.12 seconds including fixture construction, on macOS. This is not live ACP/shutdown acceptance.
  • Rustfmt, whitespace and source/raw-log hash verification pass. Initial minimal-feature compile and memory-only-fixture assertion failures are retained and explained in evidence; they are not claimed as passes.

Read-only diagnosis confirms the amd64 OCI revision 45a1b9bedb0d43aaec7eafec6cd58dfeed045347, before #665's 9d594c09. Ptah is independently pinned, so platform Keel rollouts did not update it. No live patch/apply/restart, daemon probe, secret write, workload move or sizing PR was made. More memory would leave the same expansion and consume capacity on overcommitted stor03.

Parent review/merge required. Then publish verified main images and roll out through GitOps; verify background/snapshot cycles, bounded memory, responsive ACP, graceful drain and fact/goal/WAL/epoch continuity before claiming ptah-house and akh-houses Ready. This addresses a concrete path from #659, not its entire acceptance matrix.

Diagnosis, commands, failed attempts, raw test logs and immutable image evidence: docs/ops/ptah-house-20261018.md and docs/ops/evidence/ptah-house-20261018/.

Ptah is unready after three container OOMs at its 3 GiB limit. Its 25,883 `part-of` edges expand to 2,677,838 antecedent pairs after the existing noise/type guards. The rule matcher retained the complete join before consulting the 1,000-output cap, rescanning the whole graph for each partial binding. That is a reproduced unbounded allocation/CPU path consistent with the OOM/control stall; the exact live allocation stack remains unknown. This change streams the join, uses bound subject/object/predicate indexes, enforces output limits while traversing, and shares a 100,000-candidate work budget across rules/iterations. Exhaustion explicitly reports incomplete search and never a fixpoint. Existing confidence/type/noise checks, support provenance and independently asserted-edge ownership remain covered. Task-start logging identifies future unfinished daemon work. Ptah also logged a snapshot insert with 95,760 parameters. The atomic publisher's symbol/cognitive-table macro omitted PostgreSQL chunking. It now sizes inserts from actual entity columns while preserving SQLite's row bound and the same fenced, atomic transaction. Validation at source commit `3d6731ce`: - 44/44 rule tests pass, zero ignored, with ACP+daemon compilation. The regression fixture has four million possible support pairs, stops at three outputs, asserts zero whole-graph scans and real durable provenance. Rejected joins, shared budget and global output cap are covered. - Generated PostgreSQL SQL regression: 1/1 pass. Existing disposable SQLite publication-contention test: 1/1 pass. Both zero ignored. - Separate large-branch fixture: 48,332,800-byte peak RSS, 19.12 seconds including fixture construction, on macOS. This is not live ACP/shutdown acceptance. - Rustfmt, whitespace and source/raw-log hash verification pass. Initial minimal-feature compile and memory-only-fixture assertion failures are retained and explained in evidence; they are not claimed as passes. Read-only diagnosis confirms the amd64 OCI revision `45a1b9bedb0d43aaec7eafec6cd58dfeed045347`, before #665's `9d594c09`. Ptah is independently pinned, so platform Keel rollouts did not update it. No live patch/apply/restart, daemon probe, secret write, workload move or sizing PR was made. More memory would leave the same expansion and consume capacity on overcommitted stor03. Parent review/merge required. Then publish verified main images and roll out through GitOps; verify background/snapshot cycles, bounded memory, responsive ACP, graceful drain and fact/goal/WAL/epoch continuity before claiming `ptah-house` and `akh-houses` Ready. This addresses a concrete path from #659, not its entire acceptance matrix. Diagnosis, commands, failed attempts, raw test logs and immutable image evidence: `docs/ops/ptah-house-20261018.md` and `docs/ops/evidence/ptah-house-20261018/`.
Bound Ptah rule joins and chunk atomic snapshot publication
Some checks failed
CI / test-native-receiver-isolation (pull_request) Successful in 7m34s
CI / test-sokar-sharing (pull_request) Successful in 2m37s
CI / check-seshat (pull_request) Successful in 3m44s
CI / check-akh-medu (pull_request) Successful in 7m53s
CI / test-sokar (pull_request) Successful in 10m47s
CI / docker-sokard (pull_request) Successful in 12m56s
CI / test-session-platform (pull_request) Successful in 34m48s
CI / test-akh-medu (pull_request) Successful in 24m9s
CI / test-native-client-computer (pull_request) Successful in 34m2s
CI / docker-seshd (pull_request) Failing after 30m56s
CI / docker-akh-transcripts (pull_request) Successful in 26m47s
CI / publish-chart (pull_request) Successful in 16m20s
CI / platform-images-home (pull_request) Failing after 52m13s
CI / platform-images-core (pull_request) Successful in 52m4s
CI / platform-images-daemons (pull_request) Successful in 3m24s
CI / platform-images-fleet (pull_request) Has been skipped
CI / platform-images-collect (pull_request) Has been skipped
3d6731ce24
Author
Owner

Merging on authoritative Solstice evidence: the push-free rerun (run 4328, dispatched 10:17Z after talos #222 removed the public-ingress dependency) completed 18/18 jobs succeeded at exact head 3d6731ce. Forgejo commit statuses still show the pre-fix infra failures (connection refused / incomplete checkout) because the dispatch run did not post statuses; tracked separately.

Merging on authoritative Solstice evidence: the push-free rerun (run 4328, dispatched 10:17Z after talos #222 removed the public-ingress dependency) completed 18/18 jobs succeeded at exact head 3d6731ce. Forgejo commit statuses still show the pre-fix infra failures (connection refused / incomplete checkout) because the dispatch run did not post statuses; tracked separately.
Sign in to join this conversation.
No reviewers
No labels
follow-up
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/akh-medu!670
No description provided.