Repository navigation
Knowledge graph slice with fixture owner startup repair (#841) - #899
Conversation
Scope/direction validation, evidence citation resolution, and relation identity refusal, with the focused knowledge-behavior entry registered in check-native.sh. Source packet carried from PR #863 head 94b6de0 onto Main bcfa678 without touching that branch. DB-backed fixture seed currently blocks on owner commit publication; see report.
Store commits publish through the database owner. The host starts that owner by re-executing the executable with --instance-owner. The focused knowledge entry had no such case, so the spawned owner exited on usage and the publish connect loop never returned; every fixture seed timed out. main_args now serves --instance-owner through Custody.Instance.owner and --instance-shutdown through Custody.Instance.shutdown, matching instance_owner_cli in main.bend. knowledge.py gains the bounded per-command timeout required by #841.
|
Validation status from the author session (uid 986, batonci): the bounded build/test run has not been executed yet. This shell sits in an unbounded user scope; cgroup v2 is root-owned read-only for this uid, the user manager bus belongs to a different uid, and systemd system scopes require interactive authentication. The previous harness-created native scope no longer exists. Acquiring a fresh delegated cgroup with memory.max 17179869184 and memory.swap.max 0 therefore remains a root-side step, using /tmp/validate-knowledge-owner-fix.sh on the runner. No unbounded or address-space-limited build was run as a substitute. The PR stays not merge-ready until all 6 knowledge-behavior tests pass in that scope. |
Message bodies are stored text. The inbox body for the finding notice is the JSON text written by notice_statement, so the test parses it before comparing the structured value. Production body semantics are unchanged. Reuses the b9ac fixture executable; no C generation rerun.
|
Assertion correction pushed: head is now 57ea2ac. The test_791 inbox assertion now parses the stored message body text (json.loads) before comparing the structured notice value; production body semantics are unchanged. Reused the existing b9ac fixture executable (no C generation rerun): BATON2_EXE=.scratch/bend2/knowledge-behavior-test python3 bend2/test/knowledge-behavior.py -v reports Ran 6 tests in 4.724s, OK (6/6). Remaining production coverage: the full bend2/test/knowledge.py acceptance against the complete baton2 executable has not run in this PR; it needs the full native build. Root review/merge requested. |
Scope
Carries the knowledge graph slice from #863 (issues #789, #790, #791) onto current main and repairs the fixture owner startup failure in #841.
Commits:
8dd36243eports the Apply knowledge scope, evidence provenance and relation identity checks #863 packet: scope and direction validation,evidenceReferenceresolution, search/traverse read wiring,relation-id-conflictrefusal, the focusedknowledge-behaviorentry and tests, and gate registration incheck-native.sh.b9ac7cc45repairs fixture owner startup. Store commits publish through the database owner. The host starts that owner by re-executing the executable with--instance-owner(br_instance_spawn,br_instance_connectinprocess-spawn.c). The focused entry had no--instance-ownercase, so each spawned owner exited on the usage path and the publish connect loop retried without returning. Every fixtureseedcall then hit its 60 second timeout (6 of 6 tests).main_argsinknowledge-behavior.bendnow serves--instance-ownerthroughCustody.Instance.ownerand--instance-shutdownthroughCustody.Instance.shutdown, matchinginstance_owner_cliinmain.bend.knowledge.pyrecords a bounded 60 second timeout per fixture command and reports the command with captured output on expiry, as Knowledge fixture blocks in its first attach CLI command #841 requires.Observed failure before this change
BATON2_EXE=.scratch/bend2/knowledge-behavior-test python3 bend2/test/knowledge-behavior.pyreportedRan 6 testswith 6 errors; each error issubprocess.TimeoutExpiredon theseedcommand after 60 seconds.Validation requested
This session has no authority to create a bounded cgroup, so the build and test below still require one run in a fresh delegated cgroup. Resource needs: cgroup v2 with
memory.max = 17179869184(16 GiB) andmemory.swap.max = 0, the executing shell moved into that cgroup, Bend 2.0.25, clang 19, Python 3. No address-space rlimit: the Bend runtime reserves address space and the launch guard refuses capped shells.Script:
/tmp/validate-knowledge-owner-fix.shon the runner. Its commands:Expected result: the build completes and all 6 behavior tests pass, including graph search/traverse, evidence resolution, and relation identity checks. The full
knowledge.pyacceptance still needs the completebaton2executable and is a separate run.This PR is not merge-ready until that validation passes.