Skip to content

Claude/setup adaworld repos 4k pex#4

Merged
AdaWorldAPI merged 6 commits into
mainfrom
claude/setup-adaworld-repos-4kPEX
Mar 13, 2026
Merged

Claude/setup adaworld repos 4k pex#4
AdaWorldAPI merged 6 commits into
mainfrom
claude/setup-adaworld-repos-4kPEX

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

No description provided.

claude and others added 6 commits March 13, 2026 04:20
…g traversal + 7 ground truth tests

Implements the full SPO (Subject-Predicate-Object) graph primitives stack:

- graph/fingerprint.rs: label_fp() with 11% density guard, dn_hash(), hamming_distance()
- graph/sparse.rs: Bitmap [u64;BITMAP_WORDS] (fixes old [u64;2] truncation), pack_axes()
- graph/spo/truth.rs: TruthValue (NARS frequency/confidence), TruthGate (OPEN/WEAK/NORMAL/STRONG/CERTAIN)
- graph/spo/builder.rs: SpoBuilder with forward/reverse/relation query vector construction
- graph/spo/store.rs: SpoStore with 2^3 projection verbs (SxP2O, PxO2S, SxO2P), gated queries, semiring chain walk
- graph/spo/semiring.rs: HammingMin semiring (min-plus over Hamming distance)
- graph/spo/merkle.rs: MerkleRoot, ClamPath, BindSpace with verify_lineage (known gap documented) and verify_integrity
- graph/mod.rs: ContainerGeometry enum with Spo=6

Ground truth integration tests (7/7 pass):
1. SPO hydration round-trip (insert + forward/reverse query)
2. 2^3 projection verbs consistency (all three agree on same triple)
3. TruthGate filtering (OPEN=2, STRONG=1, CERTAIN=0 for test data)
4. Belichtung prefilter rejection rate (<10 hits from 100 edges)
5. Semiring chain traversal (3 hops with increasing cumulative distance)
6. ClamPath+MerkleRoot integrity (documents verify_lineage no-op gap)
7. Cypher vs projection verb convergence (SPO side validated)

31 unit tests + 7 integration tests, all passing. Clippy clean.

https://claude.ai/code/session_016SeGMg1pgf1MqK8YWkedvV
@AdaWorldAPI AdaWorldAPI merged commit d7dea40 into main Mar 13, 2026
@AdaWorldAPI AdaWorldAPI deleted the claude/setup-adaworld-repos-4kPEX branch March 13, 2026 05:17
AdaWorldAPI pushed a commit that referenced this pull request Apr 20, 2026
Addresses all 5 follow-ups from .claude/knowledge/cam-pq-unified-pipeline.md:

#1 Wire register_cam_udfs in execute_with_context
  - CypherQuery::with_cam_codebook(codebook) builder method
  - execute_with_context auto-registers cam_distance + cam_heel_distance
    UDFs when codebook is set
  - One-line unblock for SQL/Cypher CAM-PQ queries

#2 Migrate cam_pq_calibrate output to Lance schema
  - codebook_to_lance() in lance-graph/src/cam_pq/storage.rs
  - Converts (codebook, fingerprints) -> (vectors_batch, codebook_batch)
  - Arrow RecordBatches ready for Lance write; bridges bgz-tensor's raw
    calibration output to the canonical storage format

#3 impl OrchestrationBridge for codec research (nd.* step-types)
  - codec_bridge.rs: CodecResearchBridge owns StepDomain::Ndarray
  - nd.tensors / nd.calibrate / nd.probe dispatch via codec_research
  - Parses args from step.reasoning as WireRequest JSON
  - Complements planner's lg.* bridge

#4 Generic OrchestrationBridge routing endpoint
  - POST /v1/shader/route — accepts WireUnifiedStep JSON
  - Composed bridge: tries CodecResearchBridge first (nd.*), falls
    through to PlannerAwareness (lg.*) if DomainUnavailable
  - planner_bridge.rs preserved as typed convenience (rich responses)
  - Both patterns coexist: generic route + typed Wire DTOs

#5 WireUnifiedStep + WireStepResult DTOs
  - Generic step envelope: {step_id, step_type, reasoning}
  - Generic result: {step_id, step_type, status, reasoning, confidence}
  - POST /v1/shader/route uses these; per-op endpoints stay for
    convenience with their richer typed responses

All 5 follow-ups delivered in one commit. 46/46 shader-driver tests
pass. lance-graph compiles clean.

https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh
AdaWorldAPI added a commit that referenced this pull request May 6, 2026
… MCP scope)

Same-day follow-up to MedCareV2#7 in the LanceProbe arc (#4#5 → R2-R6 → #7#8). Cannot fetch diff — MedCareV2 is outside the MCP allowlist; placeholder
entry preserves the trail. Two same-day MedCareV2 PRs are kept as separate
entries (do not collapse) per the appended note in the file.

If/when the diff is paste-shared or allowlist extended, promote Confidence from
"Cannot verify" to FINDING with concrete delta.
AdaWorldAPI added a commit that referenced this pull request May 6, 2026
…ITICAL fixes required)

Meta-1 review surfaces 10 findings; 2 CRITICAL fixes block Round 2 opening:

CRITICAL #1: Doctor.Anamnese Full predicate-write violates BMV-Ä §57 append-only
  → fix: empty writable_predicates, keep only "append" action
CRITICAL #2: Receptionist clinical-blind fails safety (no Identity-read for
  allergy/triage lookup before scheduling)
  → fix: merge Patient permission to Detail-depth + 3 demographic writes,
    add Identity-read on Diagnosis + LabResult

HIGH #3-#4 (defer to Round 3 gate.rs): Diagnosis finalize/retract Escalate +
  Patient anonymize/merge/delete Escalate (GDPR Art.17 + §35 BDSG)
MEDIUM #5-#8 (backlog): Missing entities (Termin, Recall, ePA) + audit trail hook
LOW #9-#10 (backlog): PKV/GKV modulation + dynamic reason strings

Round 2 implications surfaced for W5/W8.
Round 3 implications surfaced for W9/W12 (Escalate wrapping + §73 SGB V test).

Concrete diff for W3-revision-2 included at end of file.
Next commit: W3-revision-2 applies the two CRITICAL fixes.
AdaWorldAPI added a commit that referenced this pull request May 6, 2026
…1 CRITICAL fix path)

Meta-2 review surfaces 5 findings; 1 CRITICAL flagged for verification:

CRITICAL #1: W7 hard-depends on StepDomain::MedCare which may not exist upstream
  → Recommended fix path: fetch lance-graph-contract/src/orchestration.rs to
    verify DomainProfile shape, then either confirm variant exists OR commit
    W7-revision-2 with inline-constructed DomainProfile fallback

MEDIUM #2: MedCareStack empty struct doc-comment overclaims as "facade"
  → Doc-only fix; defer to next field-growth commit

MEDIUM #3: Missing with_default_policies() builder
  → Backlog; lands when rls_registry field lands

LOW #4-#5: Cross-crate test + dev-deps deferred

Round 3 implications surfaced:
- W9 imports list (medcare_rbac::{policy, role, access})
- W10 lib.rs gate re-export shape
- W12 §73 SGB V tests must include BtM Escalate + Ueberweisung row visibility
  (Meta-1 carry-forward)

Sprint orchestrator: verify upstream StepDomain::MedCare before
committing W7-revision-2, OR apply fail-safe inline construction.
AdaWorldAPI added a commit that referenced this pull request May 6, 2026
…e (sprint closure)

Meta-3 final review surfaces 5 findings; ZERO CRITICAL:

HIGH #1: Action operations (Operation::Act) unreachable via gate
  → Doc note recommended; orchestration layer is the right home for action gating
HIGH #2: BtM Escalate "v1 limitation" tests use loose is_allowed() assertions
  → Recommend tightening to explicit assert_eq!(AccessDecision::Allow)
    for clearer future test-failure messages

MEDIUM #3: Three name paths for Policy (rbac, gate, lib)
  → Backlog; doc-only canonicalization
MEDIUM #4: 20-200 ns gate decision claim unbenchmarked
  → Backlog; criterion-based gate-bench follow-up
LOW #5: TD-MEMBRANE-FIRST-VS-ANY untested
  → Backlog; vacuous in v1 without divergence case

Sprint-wide closure:
- Round 1 (medcare-rbac): 26 tests, solid, 2 CRITICAL fixes applied
- Round 2 (medcare-realtime skeleton): 5 tests, 1 CRITICAL casing+HIPAA fix
- Round 3 (gate impl): 33 tests, 2 HIGH documentation gaps
- Total: 64 tests across 3 crates

VERDICT: Ship. POLICY-1 medcare-side seam CLOSED for v1. Topology I-1/I-2/I-3/I-4
upheld. PR #29 three TD caveats honestly carried forward.
AdaWorldAPI added a commit that referenced this pull request May 6, 2026
…closure

12 workers + 3 metas across 3 rounds, 4 CRITICAL fixes applied as inline
revisions (W3-rev2, W4-rev2, W7-rev2). Meta-3 final verdict: SHIP.

Total shipped:
- medcare-rs: 14 commits, 13 files, ~1,865 LOC, 64 tests
- lance-graph sprint-log: 21 commits (12 agent logs + 3 meta reviews +
  scaffolding + this synthesis)

POLICY-1 / MEMBRANE-GATE-1 medcare-side seam: SHIPPED v1
- Mirror of smb-office-rs#29 with regulatory adaptations
- Three TD caveats from PR #29 honestly carried forward
- Topology I-1/I-2/I-3/I-4 invariants preserved

Outstanding from Meta-3 (backlog):
- HIGH #1: Action ops doc note (5 min)
- HIGH #2: Tighten v1-limit assertions (10 min)
- MEDIUM #3-#4: Policy name canonicalization + bench harness
- LOW #5: TD-MEMBRANE-FIRST-VS-ANY test (vacuous in v1)

Synthesis includes:
- Findings summary (4 CRITICAL applied + 2 HIGH backlog)
- Topology invariant preservation table
- Upstream gaps surfaced (StepDomain verified, BMV-Ä retention, BtM Escalate)
- Test posture per-crate
- Recommended follow-up sprint scope (~half day)
- What the cca2a pattern validated this run
- Full branch state at sprint closure (commit lists for both repos)

Ready for CI verification + PR to medcare-rs main.
AdaWorldAPI pushed a commit that referenced this pull request May 18, 2026
…r-actor (Sprint 0)

Adds two new stub crates from the four-repo integration plan as
workspace-EXCLUDED scaffolds (additive contract shape; promoted to
members in Sprint 1/2 once heavy deps land).

* crates/lance-graph-tikv-provider/  (Glue #2, plan §5)
  TikvNodeTableProvider + TikvEdgeTableProvider stubs implementing
  datafusion::catalog::TableProvider + lance_graph_contract::provider
  markers. Bodies are Sprint 1 unimplemented!() with the trait shape
  pinned.

* crates/cognitive-shader-actor/  (Glue #4, plan §6)
  CognitiveShaderActor<S> wrapping any SupervisableShader (from the
  new lance_graph_contract::actor module) as a ractor::Actor with
  ShaderMessage enum + ShaderSupervisor stub. Bodies are Sprint 2
  unimplemented!() pending ractor::Actor signature confirmation.

Both crates depend only on lance-graph-contract = "0.2" (path) plus
their domain crates (tikv-client / ractor); no existing crate gains
or loses a dep. Workspace check stays unaffected (excluded).

Workers: LG-1, LG-2. Sprint 0 of the four-repo wave.
AdaWorldAPI pushed a commit that referenced this pull request May 18, 2026
…aderActor

Sprint 1 Glue #4 implementation. Replaces the wave-1 commented-out
scaffold with a real `ractor::Actor` impl against ractor 0.15.13:

* Associated types: Msg = ShaderMessage<S::Payload>, State = Arc<S>,
  Arguments = Arc<S>. `S::Error: Into<anyhow::Error>` + `S::Payload: Debug`
  bounds added.
* `pre_start`: identity (shader passed via Arguments lives in State).
* `handle` dispatches all three `ShaderMessage` variants:
  - Apply: shader.apply(input) → reply with anyhow::Result<P>
  - ApplyDelta: shader.apply_delta(delta), no reply
  - Drain: spin-yield while inflight > 0, shader.drain(), reply (),
    `myself.stop(Some("drained"))`
* End-to-end test `e2e_apply_doubles_input`: Counter shader (Payload=u32),
  spawn via `Actor::spawn`, ractor::call!(actor, ShaderMessage::Apply,
  input=5) → asserts Ok(10).

`cargo test --manifest-path crates/cognitive-shader-actor/Cargo.toml`:
1/1 test passes; `cargo check` clean.

Worker: W-LG-4. Sprint 1 of the four-repo integration.
AdaWorldAPI added a commit that referenced this pull request May 18, 2026
…sis-LXmug

feat(integration): lance-graph-contract 0.2.0 + Glue #2/#4 scaffolds (Sprint 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants