Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8e91c16
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
b5f97bd
ci: retrigger T-38B floor checks
briansrls Jun 2, 2026
9aaddc7
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
70973ba
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
d09b05b
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
e1b4e4c
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
3dd044d
fix: label ownership verdict surface witness
briansrls Jun 2, 2026
15f6348
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
3089d84
ci: retrigger after review rate-limit reset
briansrls Jun 2, 2026
c0ea91b
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
65fa73e
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
aace18a
Fix lens ownership roster claim id authority
briansrls Jun 2, 2026
eb4cb1d
Remove duplicate lens ownership claim authority
briansrls Jun 2, 2026
b504c9c
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
11c3029
Merge remote-tracking branch 'origin/main' into session/royal-otter-710
briansrls Jun 2, 2026
8a67ebe
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
5d9f450
WIP: T-38B lens_ownership: fix PR #4264 codex blocking — structural_w…
briansrls Jun 2, 2026
98f8c58
Merge remote-tracking branch 'origin/main' into session/royal-otter-710
briansrls Jun 2, 2026
561785d
fix: drop unused lens_ownership_node_subject_rows CI symbol
briansrls Jun 2, 2026
f4354c6
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls Jun 2, 2026
9fed0b1
fix: import Bool in lens_ownership subject_roster
briansrls Jun 2, 2026
dad4a15
Merge branch 'session/royal-otter-710' of https://github.com/gunb-ai/…
briansrls Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions scripts/check_t38b_lens_ownership.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/usr/bin/env python3
"""T-38B lens_ownership family roster and run_test_claim wiring receipt."""

from __future__ import annotations

from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]

OWNERSHIP_CLAIM = ROOT / "src/v4/test/claim/lens_ownership/resource_dependency.dag"
SUBJECT_ROSTER = ROOT / "src/v4/test/claim/lens_ownership/subject_roster.dag"
FAMILY_EVAL = ROOT / "src/v4/test/claim/workflow/lens_ownership_family_eval.dag"
CI = ROOT / "src/v4/workflow/ci.dag"


def _read(path: Path) -> str:
if not path.is_file():
raise SystemExit(f"missing required path: {path}")
return path.read_text(encoding="utf-8")


def _require_substrings(label: str, text: str, needles: tuple[str, ...]) -> None:
missing = [needle for needle in needles if needle not in text]
if missing:
raise SystemExit(f"{label}: missing required substrings: {missing!r}")


def main() -> None:
ownership_claim = _read(OWNERSHIP_CLAIM)
subject_roster = _read(SUBJECT_ROSTER)
family_eval = _read(FAMILY_EVAL)
ci = _read(CI)

_require_substrings(
"resource_dependency.dag",
ownership_claim,
(
"data ownership_resource_dependency_claim_passes: Bool",
"ResourceDependsOn",
"RequiresAccessWitness",
"ownership_witness",
),
)

_require_substrings(
"subject_roster.dag",
subject_roster,
(
"type LensOwnershipSubject",
"structural_witness: Bool",
"ownership_resource_dependency_claim_passes",
"data subject_lens_ownership_resource_dependency: TestClaimEvalSubject<Node>",
"eval_test_claim_subject(",
"data lens_ownership_subject_roster: List<LensOwnershipSubject>",
"data lens_ownership_node_subject_rows: List<TestClaimEvalSubject<Node>>",
"subject_lens_ownership_resource_dependency",
),
)

roster_body = subject_roster.split("data lens_ownership_node_subject_rows:")[1].split("]")[0]
if roster_body.count("subject_lens_ownership_resource_dependency") != 1:
raise SystemExit("lens_ownership_node_subject_rows must roster exactly the resource-dependency subject")

_require_substrings(
"lens_ownership_family_eval.dag",
family_eval,
(
"import v4.compiler.eval",
"run_test_claim",
"lens_ownership_node_subject_rows",
"fn run_lens_ownership_subjects",
"map(subjects, fn(subject) { run_test_claim(subject: subject) })",
"runs: run_lens_ownership_subjects(subjects: lens_ownership_node_subject_rows)",
"fn lens_ownership_family_report_tally",
"witness_lens_ownership_family_gate_closed",
),
)

_require_substrings(
"ci.dag",
ci,
(
"lens_ownership_family_eval_execution",
"LensOwnershipFamilyEvalCommand",
"ci_lens_ownership_family_eval_command",
"src/v4/test/claim/lens_ownership/subject_roster.dag",
"src/v4/test/claim/workflow/lens_ownership_family_eval.dag",
"ci_lens_ownership_family_eval_claim_ids",
"claim_lens_ownership_resource_dependency",
"witness_lens_ownership_family_gate_closed",
),
)

print("OK: T-38B lens_ownership subject roster + run_test_claim family CI receipt.")


if __name__ == "__main__":
main()
30 changes: 30 additions & 0 deletions scripts/test_check_t38b_lens_ownership.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3
"""Self-test for scripts/check_t38b_lens_ownership.py."""

from __future__ import annotations

import subprocess
import sys
from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]


def main() -> None:
result = subprocess.run(
[sys.executable, str(ROOT / "scripts/check_t38b_lens_ownership.py")],
cwd=ROOT,
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
if result.returncode != 0:
raise SystemExit(result.stderr or result.stdout)
if "OK: T-38B lens_ownership" not in result.stdout:
raise SystemExit("checker did not print the expected OK receipt")


if __name__ == "__main__":
main()
70 changes: 70 additions & 0 deletions src/v4/test/claim/lens_ownership/subject_roster.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// src/v4/test/claim/lens_ownership/subject_roster.dag
// Scope: T-38B lens_ownership family roster — names the ownership subject family and wires a TestClaimEvalSubject row for corpus execution.
// Status: family receipt — one resource-dependency subject, routed through run_test_claim by workflow/lens_ownership_family_eval.dag.

module v4.test.claim.lens_ownership.subject_roster


import v4.compiler.eval {
TestClaimEvalSubject,
eval_context_v4_evaluator_wave1,
eval_test_claim_subject
}
import v4.std.collection { List }
import v4.std.logic { Bool }
import v4.std.node { Node, Symbol }
import v4.std.verification {
EqualsClaim,
ManualAnchorAbsent,
TestClaim,
TestClassification,
Tier1,
Unit,
manual_claim_anchor
}
import v4.test.claim.lens_ownership.resource_dependency {
ownership_claim_tree,
ownership_resource_dependency_claim_passes,
ownership_root
}


data lens_ownership_resource_dependency_pin: Symbol = lens_ownership_resource_dependency_pin


type LensOwnershipSubject {
claim: TestClaim

This comment was marked as resolved.

structural_witness: Bool
eval_subject: TestClaimEvalSubject<Node>

This comment was marked as resolved.

}


data claim_lens_ownership_resource_dependency: TestClaim = EqualsClaim {
label: "lens_ownership resource dependency witness is rostered",
anchor: manual_claim_anchor(anchor: ManualAnchorAbsent),
lhs: ownership_root,
rhs: ownership_root,
classification: TestClassification { tier: Tier1, layer: Unit }
}


data subject_lens_ownership_resource_dependency: TestClaimEvalSubject<Node> = eval_test_claim_subject(
claim: claim_lens_ownership_resource_dependency,
context: eval_context_v4_evaluator_wave1(),
tree: ownership_claim_tree(),
evaluator_pin: lens_ownership_resource_dependency_pin
)


data lens_ownership_subject_roster: List<LensOwnershipSubject> = [
LensOwnershipSubject {
claim: claim_lens_ownership_resource_dependency,
structural_witness: ownership_resource_dependency_claim_passes,
eval_subject: subject_lens_ownership_resource_dependency
}
]


data lens_ownership_node_subject_rows: List<TestClaimEvalSubject<Node>> = [
subject_lens_ownership_resource_dependency
]
84 changes: 84 additions & 0 deletions src/v4/test/claim/workflow/lens_ownership_family_eval.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// src/v4/test/claim/workflow/lens_ownership_family_eval.dag
// Scope: T-38B family CI receipt — lens_ownership subject roster maps through run_test_claim and gates the family tally.
// Status: source-shape receipt; host CI can pin this file until generated item-registry reflection replaces explicit family rosters.

module v4.test.claim.workflow.lens_ownership_family_eval


import v4.compiler.eval {
TestClaimEvalSubject,
TestClaimRun,
run_test_claim,
test_claim_run_verdict
}
import v4.std.algebra { fold_list, is_empty }
import v4.std.collection { List }
import v4.std.logic { Bool }
import v4.std.nat { Nat, Zero }
import v4.std.node { Node }
import v4.std.runtime { RuntimeValue }
import v4.std.verdict {
VerdictTally,
verdict_tally_add,
verdict_tally_empty,
verdict_tally_total
}
import v4.test.claim.lens_ownership.subject_roster {
lens_ownership_node_subject_rows,
lens_ownership_subject_roster
}


type LensOwnershipFamilyEvalReport {
runs: List<TestClaimRun<Node, RuntimeValue>>
}


fn run_lens_ownership_subjects(
subjects: List<TestClaimEvalSubject<Node>>
) -> List<TestClaimRun<Node, RuntimeValue>> {
map(subjects, fn(subject) { run_test_claim(subject: subject) })
}


fn run_lens_ownership_family_eval() -> LensOwnershipFamilyEvalReport {
LensOwnershipFamilyEvalReport {
runs: run_lens_ownership_subjects(subjects: lens_ownership_node_subject_rows)
}
}


fn lens_ownership_family_report_tally(report: LensOwnershipFamilyEvalReport) -> VerdictTally {
fold_list(
xs: report.runs,
empty: verdict_tally_empty,
cons: fn(acc, run) {
verdict_tally_add(t: acc, v: test_claim_run_verdict(run: run))
}
)
}


fn lens_ownership_family_report_total(report: LensOwnershipFamilyEvalReport) -> Nat {
verdict_tally_total(t: lens_ownership_family_report_tally(report: report))
}


fn lens_ownership_family_all_pass(report: LensOwnershipFamilyEvalReport) -> Bool {
let tally = lens_ownership_family_report_tally(report: report)
(tally.fail == Zero) && (tally.deferred == Zero)
}


fn lens_ownership_family_gate(report: LensOwnershipFamilyEvalReport) -> Bool {
if is_empty(xs: lens_ownership_subject_roster) {
false
} else {
lens_ownership_family_all_pass(report: report)
}
}


data witness_lens_ownership_family_gate_closed: Bool = lens_ownership_family_gate(
report: run_lens_ownership_family_eval()
)
Loading
Loading