mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-12-05 10:34:23 +01:00
Add two-estimate interaction experiments (F14): measure whether two ready dossier estimates interact when applied together, in which order, and under which conversation history, without treating orthogonality as independence. - Arms: baseline, A, B, each declared order, matched random controls for each, optional protected arms (one component restricted to the complement of the other's span) and a baseline replay; restoration is checked after every arm and a failure stops the attempt. - Orders and history mode (single turn, matched context, diverged) are part of the spec digest. Components pass the harness's model and independence checks; confirmation-locked rows are refused. - Interaction is the per-example difference-in-differences of task success with a seeded paired bootstrap interval and an exact sign test, compared against the random-control sequence; order sensitivity is reported. "Independent" is never an outcome, and geometry never feeds one. - Protection reports projection preservation and behaviour preservation separately. - Results link to dossiers by reference as descriptive evidence only, re-verified on read, never granting labels. `obliteratus experiments interact` and an Explorer interaction view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
3.1 KiB
Python
56 lines
3.1 KiB
Python
"""``obliteratus experiments interact run|show|attach|list`` (interaction experiments)."""
|
|
|
|
|
|
def add_interact(commands):
|
|
parser = commands.add_parser(
|
|
"interact", help="Interaction and preservation experiments between two ready dossier "
|
|
"estimates (A, B, A>B, B>A with matched controls)")
|
|
sub = parser.add_subparsers(dest="interact_command", required=True)
|
|
run = sub.add_parser("run", help="Run an interaction spec; results go to "
|
|
"<run>/interactions/<digest>/attempts/NNNN/")
|
|
run.add_argument("spec", help="Interaction spec JSON file")
|
|
run.add_argument("--run", required=True, help="Run directory holding the dossiers")
|
|
run.add_argument("--rerun", action="store_true",
|
|
help="Start a new attempt even when a complete attempt exists")
|
|
run.add_argument("--registry", help="Another confirmation registry to consult")
|
|
show = sub.add_parser("show", help="Re-verify a stored result and print its summary")
|
|
show.add_argument("result", help="result.json or attempt directory")
|
|
attach = sub.add_parser("attach", help="Link a result to a dossier as descriptive "
|
|
"evidence (never changes its label)")
|
|
attach.add_argument("result", help="result.json")
|
|
attach.add_argument("--dossier", required=True, help="Dossier JSON file")
|
|
listing = sub.add_parser("list", help="Re-verified interaction results linked to a dossier")
|
|
listing.add_argument("--dossier", required=True, help="Dossier JSON file")
|
|
|
|
|
|
def summary(result):
|
|
from obliteratus.analysis.interaction_report import headline
|
|
analysis = result["analysis"]
|
|
out = {key: result[key] for key in ("spec_digest", "attempt", "orders", "history_mode",
|
|
"label_effect", "location") if key in result}
|
|
out["evidence_scope"] = result["evidence_scope"]["scope"]
|
|
out["geometry"] = analysis["geometry"]
|
|
out["headline"] = headline(analysis)
|
|
if "protection" in analysis:
|
|
out["protection"] = {name: {"status": entry["status"], "reason": entry["reason"],
|
|
"projected_quantity": entry.get("projected_quantity")}
|
|
for name, entry in analysis["protection"]["components"].items()}
|
|
out["behaviour_preservation"] = analysis.get("behaviour_preservation")
|
|
return out
|
|
|
|
|
|
def run_interact_command(args):
|
|
from obliteratus.analysis import dossier_interactions
|
|
from obliteratus.experiments import interaction_runner
|
|
if args.interact_command == "run":
|
|
return summary(interaction_runner.run_interaction(
|
|
args.spec, args.run, rerun=args.rerun, registry_dir=args.registry))
|
|
if args.interact_command == "show":
|
|
return summary(interaction_runner.load_interaction_result(args.result, verify=True))
|
|
if args.interact_command == "attach":
|
|
return dossier_interactions.attach_interaction(args.dossier, args.result)
|
|
return dossier_interactions.describe(args.dossier)
|
|
|
|
|
|
__all__ = ["add_interact", "run_interact_command", "summary"]
|