Skip to content

Commit d6e7a57

Browse files
authored
Merge pull request #63 from rsolerortuno/agent/codex/507-v0-5-real-release-closure
Close the reproducible v0.5.0 DepMap workflow
2 parents b8f52c2 + e7d9d60 commit d6e7a57

34 files changed

Lines changed: 833 additions & 3 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"configuration_format_version":"v0.5.0","evidence_classification":"local_real_public_release","release_manifest":"REPLACE_WITH_LOCAL_RELEASE_MANIFEST.json","data_root":"REPLACE_WITH_LOCAL_DATA_DIRECTORY","target_subset":"REPLACE_WITH_TARGET_SUBSET.tsv","benchmark":"REPLACE_WITH_BENCHMARK.tsv","discovery_sources":"REPLACE_WITH_DISCOVERY_SOURCES.tsv","discovery_policy":"REPLACE_WITH_DISCOVERY_POLICY.json","universe_context":"REPLACE_WITH_UNIVERSE_CONTEXT.json","profile_context":"REPLACE_WITH_PROFILE_CONTEXT.json","profile_policy":"REPLACE_WITH_PROFILE_POLICY.json","baseline_ranking":"REPLACE_WITH_EXPLICIT_REAL_BASELINE.tsv","benchmark_policy":"REPLACE_WITH_BENCHMARK_POLICY.json","integration_policy":"REPLACE_WITH_INTEGRATION_POLICY.json","integration_context":"REPLACE_WITH_INTEGRATION_CONTEXT.json","release_policy":"REPLACE_WITH_RELEASE_POLICY.json","expected_context_identity":"melanoma_anti_pd1:v1","limitations":["Template only: replace every placeholder after human provenance review.","This file is not a completed real-data run."]}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# v0.5.0 release-closure current-state audit
2+
3+
Reviewed surfaces: the Issue 501–506 specifications and audits, canonical
4+
`targetintel.functional_dependency` modules, melanoma context package,
5+
existing release documentation, benchmark baseline fixture, and existing
6+
DepMap local-layout and checksum contracts.
7+
8+
Findings: ingestion is local-only and validates release-manifest bytes;
9+
profiles, universe freezing, benchmark evaluation, and integration are
10+
separate APIs. Issue 506 already keeps its overlay diagnostic and defaults to
11+
the baseline, but its activation state is not a module-release decision.
12+
Fixture manifests are visibly synthetic in their release identifiers and
13+
limitations, but a release-level classification boundary was previously
14+
absent. No existing module creates tags or changes production scoring.
15+
16+
Issue 507 addresses the gap with explicit evidence classification, strict
17+
configuration and policy contracts, preflight, stage orchestration, baseline
18+
preservation checks, and separately retained module and activation readiness.
19+
The included execution is synthetic fixture validation only; it is not a real
20+
DepMap release or melanoma finding.

‎docs/releases/v0.5.0.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# v0.5.0 — functional-dependency release closure architecture
2+
3+
Implemented architecture: local-only release preflight, immutable run and
4+
policy identities, deterministic orchestration of Issues 501–506, explicit
5+
release criteria, baseline-preservation recording, and deterministic artifact
6+
comparison.
7+
8+
Fixture validation: compact synthetic fixtures exercise the complete workflow
9+
and end in `blocked_fixture_evidence`. They do not establish real melanoma
10+
findings, real-data readiness, or candidate activation.
11+
12+
Real-data execution status: no completed real-data run is included in this
13+
repository. A valid human-reviewed local public release may become eligible
14+
for research-preview human review only after its required criteria and
15+
reproducibility review pass. Candidate activation remains separately governed
16+
by Issue 506 and is never automatic.
17+
18+
Remaining human actions include provenance and licensing review, benchmark and
19+
holdout review, unresolved-target review, reproducibility review, a separate
20+
module-release decision, a separate candidate decision, and any manual tag or
21+
later public release metadata update.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# v0.5.0 real-data release closure
2+
3+
Issue 507 adds an offline orchestration boundary around the Issue 501–506
4+
functional-dependency contracts. It requires an immutable, checksum-derived
5+
run configuration and a local release manifest before any scientific stage is
6+
run. Local paths are operational references and are excluded from scientific
7+
identity.
8+
9+
The module release decision is distinct from the Issue 506 candidate activation
10+
decision. A real, release-pinned and reproducible run may be submitted for
11+
human research-preview review while its candidate overlay remains blocked.
12+
Neither state activates production ranking, creates authorization, creates a
13+
tag, or changes package metadata.
14+
15+
The only evidence classifications are `synthetic_fixture`,
16+
`local_real_public_release`, and `externally_validated_real_release`. Fixture
17+
manifest identities cannot be relabelled as real. Missing, malformed, remote,
18+
credential-bearing, or hidden-reasoning configuration inputs fail closed.
19+
20+
Use `examples/depmap/run_v0_5_release_closure.py` with an explicit reviewed
21+
configuration. The supplied context template is intentionally incomplete and
22+
is not evidence of a completed real-data run.

‎examples/depmap/README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,14 @@ python examples/depmap/run_dependency_integration_gate.py \
8484
--evidence-scope synthetic_fixture \
8585
--output-dir /tmp/targetintel-dependency-integration
8686
```
87+
## v0.5.0 release closure
88+
89+
The local-only closure runner orchestrates the isolated functional-dependency
90+
stages and never changes production ranking or creates a release. The compact
91+
fixture is deliberately blocked as synthetic evidence:
92+
93+
```bash
94+
python examples/depmap/run_v0_5_release_closure.py \
95+
--run-config tests/fixtures/depmap/release_closure/run_config.json \
96+
--evidence-classification synthetic_fixture --output-dir /tmp/targetintel-v050-closure
97+
```
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env python3
2+
"""Run the local-only v0.5.0 DepMap release-closure workflow."""
3+
from __future__ import annotations
4+
import argparse
5+
from pathlib import Path
6+
import sys
7+
8+
PROJECT_ROOT = Path(__file__).resolve().parents[2]
9+
if str(PROJECT_ROOT) not in sys.path:
10+
sys.path.insert(0, str(PROJECT_ROOT))
11+
12+
from targetintel.functional_dependency import ReleaseClosureError, V050ReleaseRunConfiguration, run_release_closure
13+
14+
def main() -> int:
15+
parser = argparse.ArgumentParser(description=__doc__)
16+
parser.add_argument("--run-config", required=True)
17+
parser.add_argument("--evidence-classification", required=True)
18+
parser.add_argument("--output-dir", required=True)
19+
args = parser.parse_args()
20+
try:
21+
configuration = V050ReleaseRunConfiguration.from_file(args.run_config)
22+
result = run_release_closure(configuration, args.evidence_classification, Path(args.output_dir))
23+
except ReleaseClosureError as error:
24+
parser.error(str(error))
25+
print(result["terminal_state"])
26+
return 0
27+
28+
if __name__ == "__main__":
29+
raise SystemExit(main())

‎targetintel/functional_dependency/__init__.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
validate_evidence_scope, validate_integration_state,
3939
write_dependency_integration_artifacts,
4040
)
41+
from .release_closure import (
42+
ReleaseClosureError, V050ReleaseClosurePolicy, V050ReleaseRunConfiguration,
43+
compare_release_runs, preflight_release, run_release_closure, validate_evidence_classification,
44+
validate_release_state,
45+
)
4146

4247
__all__ = [
4348
"DepMapFileManifest",
@@ -81,4 +86,12 @@
8186
"validate_evidence_scope",
8287
"validate_integration_state",
8388
"write_dependency_integration_artifacts",
89+
"ReleaseClosureError",
90+
"V050ReleaseClosurePolicy",
91+
"V050ReleaseRunConfiguration",
92+
"preflight_release",
93+
"compare_release_runs",
94+
"run_release_closure",
95+
"validate_evidence_classification",
96+
"validate_release_state",
8497
]

‎targetintel/functional_dependency/dependency_integration.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ def build_dependency_integration(benchmark_dir: Path | str, baseline_ranking: Pa
325325
mandatory_bad = any(row["mandatory"] and row["result"] != "pass" for row in criteria)
326326
if not compatible: status = "blocked_incompatible_inputs"
327327
elif evidence_scope == "synthetic_fixture": status = "blocked_fixture_evidence"
328+
elif any(row["criterion_id"] in {"benchmark_coverage", "holdout_coverage", "eligible_target_count", "permitted_missing_profile_fraction"} and row["mandatory"] and row["result"] != "pass" for row in criteria): status = "blocked_insufficient_evidence"
328329
elif mandatory_bad: status = "blocked_policy_failure"
329330
else: status = "eligible_for_human_activation"
330331
candidate = DependencyAwareProfileCandidate(FORMAT_VERSION, "dependency_aware_melanoma_anti_pd1_candidate_v1", context["context_identity"], baseline_id, str(manifest["dependency_profile_run_id"]), str(manifest["candidate_ranking_ids"]["bounded_overlay"]), policy.policy_id, policy.permitted_candidate_construction_method, policy.fixed_rank_band_size, policy.tie_handling_rule, policy.minimum_dependency_component_count, policy.missing_profile_fallback, "dependency_aware_melanoma_anti_pd1_candidate_v1", status, ("Experimental analysis-only candidate; it is not clinically validated.", "Explicit future human authorization is required."))

‎targetintel/functional_dependency/depmap_models.py‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from hashlib import sha256
88
import json
99
from pathlib import Path, PurePosixPath
10+
import re
1011
from types import MappingProxyType
1112
from typing import Any, Mapping
1213
from urllib.parse import urlparse
@@ -72,15 +73,26 @@ def _safe_release_directory(value: str) -> bool:
7273

7374

7475
def _forbidden_nested(value: Any) -> bool:
75-
forbidden = ("credential", "password", "secret", "token", "authorization", "reasoning", "thinking", "chain_of_thought")
76+
# Keys, rather than ordinary domain prose, are controlled. In particular
77+
# legitimate limitations may mention future human authorization without
78+
# becoming a credential-bearing artifact.
79+
forbidden = frozenset({"credential", "credentials", "password", "secret", "token", "api_key", "apikey", "access_key", "access_token", "private_key", "reasoning", "hidden_reasoning", "thinking", "chain_of_thought"})
7680
if isinstance(value, Mapping):
7781
return any(
78-
_forbidden_nested(str(key)) or _forbidden_nested(item)
82+
str(key).casefold() in forbidden or _forbidden_nested(item)
7983
for key, item in value.items()
8084
)
8185
if isinstance(value, (tuple, list)):
8286
return any(_forbidden_nested(item) for item in value)
83-
return isinstance(value, str) and any(marker in value.casefold() for marker in forbidden)
87+
if not isinstance(value, str):
88+
return False
89+
# Detect structured secret/reasoning disclosures, while allowing normal
90+
# domain language such as "future authorization is required".
91+
return bool(re.search(
92+
r"(?:authorization\s*:\s*bearer\b|(?:secret|token|password|api[_-]?key|access[_-]?token)\s*[:=]|(?:chain_of_thought|hidden_reasoning)\s*:|-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----)",
93+
value,
94+
flags=re.IGNORECASE,
95+
))
8496

8597

8698
def _require(condition: bool, message: str) -> None:

0 commit comments

Comments
 (0)