Repository navigation
T-38B lens_ownership: subject roster + run_test_claim wiring + family CI receipt #4264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 b5f97bd
ci: retrigger T-38B floor checks
briansrls 9aaddc7
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 70973ba
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls d09b05b
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls e1b4e4c
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 3dd044d
fix: label ownership verdict surface witness
briansrls 15f6348
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 3089d84
ci: retrigger after review rate-limit reset
briansrls c0ea91b
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 65fa73e
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls aace18a
Fix lens ownership roster claim id authority
briansrls eb4cb1d
Remove duplicate lens ownership claim authority
briansrls b504c9c
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 11c3029
Merge remote-tracking branch 'origin/main' into session/royal-otter-710
briansrls 8a67ebe
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 5d9f450
WIP: T-38B lens_ownership: fix PR #4264 codex blocking — structural_w…
briansrls 98f8c58
Merge remote-tracking branch 'origin/main' into session/royal-otter-710
briansrls 561785d
fix: drop unused lens_ownership_node_subject_rows CI symbol
briansrls f4354c6
WIP: T-38B lens_ownership: subject roster + run_test_claim wiring + f…
briansrls 9fed0b1
fix: import Bool in lens_ownership subject_roster
briansrls dad4a15
Merge branch 'session/royal-otter-710' of https://github.com/gunb-ai/…
briansrls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| structural_witness: Bool | ||
| eval_subject: TestClaimEvalSubject<Node> | ||
This comment was marked as resolved.
Sorry, something went wrong. |
||
| } | ||
|
|
||
|
|
||
| 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 | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.