Detect stale clean release locks
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"python_file_count": 215,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Architecture Maintainability
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
"context_budget_tier": "production",
|
||||
"context_budget_limit": 1000,
|
||||
"skill_body_tokens": 797,
|
||||
"other_text_tokens": 1076786,
|
||||
"other_text_tokens": 1078122,
|
||||
"estimated_initial_load_tokens": 990,
|
||||
"estimated_total_text_tokens": 1077583,
|
||||
"deferred_resource_tokens": 495216,
|
||||
"estimated_total_text_tokens": 1078919,
|
||||
"deferred_resource_tokens": 495718,
|
||||
"deferred_resource_warn_threshold": 120000,
|
||||
"deferred_resource_dirs": [
|
||||
{
|
||||
"path": "scripts",
|
||||
"estimated_tokens": 435118,
|
||||
"estimated_tokens": 435620,
|
||||
"file_count": 140
|
||||
},
|
||||
{
|
||||
@@ -36,7 +36,7 @@
|
||||
"large_deferred_resource_dirs": [
|
||||
{
|
||||
"path": "scripts",
|
||||
"estimated_tokens": 435118,
|
||||
"estimated_tokens": 435620,
|
||||
"file_count": 140
|
||||
}
|
||||
],
|
||||
@@ -59,7 +59,7 @@
|
||||
],
|
||||
"missing": [],
|
||||
"path": "scripts",
|
||||
"estimated_tokens": 435118,
|
||||
"estimated_tokens": 435620,
|
||||
"file_count": 140,
|
||||
"rationale": "Script resources are deterministic deferred tools, not initial-load prompt context."
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
| Target | Path | Tier | Limit | Initial | SKILL | Deferred | Resource Governance | Large Deferred Dirs | Quality Density | Unused Dirs | Status |
|
||||
| --- | --- | --- | ---: | ---: | ---: | ---: | --- | --- | ---: | --- | --- |
|
||||
| root | `.` | `production` | 1000 | 990 | 797 | 495216 | `governed` | scripts:435118 | 131.3 | - | ok |
|
||||
| root | `.` | `production` | 1000 | 990 | 797 | 495718 | `governed` | scripts:435620 | 131.3 | - | ok |
|
||||
| complex-release-orchestrator | `examples/complex-release-orchestrator/generated-skill` | `production` | 1000 | 790 | 718 | 1657 | `not-required` | - | 164.6 | - | ok |
|
||||
| governed-incident-command | `examples/governed-incident-command/generated-skill` | `production` | 1000 | 760 | 658 | 1030 | `not-required` | - | 171.1 | - | ok |
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
"budget_limit": 1000,
|
||||
"initial_tokens": 990,
|
||||
"skill_body_tokens": 797,
|
||||
"deferred_resource_tokens": 495216,
|
||||
"deferred_resource_tokens": 495718,
|
||||
"large_deferred_resource_dirs": [
|
||||
{
|
||||
"path": "scripts",
|
||||
"estimated_tokens": 435118,
|
||||
"estimated_tokens": 435620,
|
||||
"file_count": 140
|
||||
}
|
||||
],
|
||||
@@ -35,7 +35,7 @@
|
||||
],
|
||||
"missing": [],
|
||||
"path": "scripts",
|
||||
"estimated_tokens": 435118,
|
||||
"estimated_tokens": 435620,
|
||||
"file_count": 140,
|
||||
"rationale": "Script resources are deterministic deferred tools, not initial-load prompt context."
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"root": ".",
|
||||
"summary": {
|
||||
"target_python": "3.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Python Compatibility
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
+13
-13
File diff suppressed because one or more lines are too long
+188
-188
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
||||
"interactive_script_count": 0,
|
||||
"package_hash_scope": "source-contract-without-generated-reports",
|
||||
"package_hash_file_count": 231,
|
||||
"package_sha256": "d50f6ac9714b62b985f9f9edb181f87bb57246be1e4249cb92e7e4a87ae5aa69"
|
||||
"package_sha256": "9cb9a19e774540e721b143a240baf41b41c32b9f10df532eb4a7d1cf7a2fe67b"
|
||||
},
|
||||
"failures": [],
|
||||
"warnings": [],
|
||||
@@ -780,7 +780,7 @@
|
||||
"uses_input": false,
|
||||
"uses_network": false,
|
||||
"uses_file_write": true,
|
||||
"uses_subprocess": false,
|
||||
"uses_subprocess": true,
|
||||
"network_urls": [],
|
||||
"network_hosts": []
|
||||
},
|
||||
@@ -3275,6 +3275,7 @@
|
||||
"scripts/ci_test.py",
|
||||
"scripts/render_benchmark_reproducibility.py",
|
||||
"scripts/render_eval_dashboard.py",
|
||||
"scripts/render_evidence_consistency.py",
|
||||
"scripts/run_eval_suite.py",
|
||||
"scripts/run_output_execution.py",
|
||||
"scripts/sync_local_install.py",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- Interactive scripts: `0`
|
||||
- Package hash scope: `source-contract-without-generated-reports`
|
||||
- Package hash files: `231`
|
||||
- Package SHA256: `d50f6ac9714b62b985f9f9edb181f87bb57246be1e4249cb92e7e4a87ae5aa69`
|
||||
- Package SHA256: `9cb9a19e774540e721b143a240baf41b41c32b9f10df532eb4a7d1cf7a2fe67b`
|
||||
|
||||
## Failures
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
| scripts/render_daily_skillops_report.py | cli | True | True | True | False | False | True | False | Renders a Daily SkillOps report that summarizes explicit-source patterns, proposals, approval state, and release evidence without scanning private logs or applying patches. |
|
||||
| scripts/render_description_drift_history.py | cli | False | True | True | False | False | True | False | Default CLI classification; add SCRIPT_INTERFACE for internal modules. |
|
||||
| scripts/render_eval_dashboard.py | cli | False | True | True | False | False | True | True | Default CLI classification; add SCRIPT_INTERFACE for internal modules. |
|
||||
| scripts/render_evidence_consistency.py | cli | True | True | True | False | False | True | False | Renders a cross-report evidence consistency gate for generated Skill OS reports. |
|
||||
| scripts/render_evidence_consistency.py | cli | True | True | True | False | False | True | True | Renders a cross-report evidence consistency gate for generated Skill OS reports. |
|
||||
| scripts/render_intent_confidence.py | cli | False | True | True | False | False | True | False | Default CLI classification; add SCRIPT_INTERFACE for internal modules. |
|
||||
| scripts/render_intent_dialogue.py | cli | False | True | True | False | False | True | False | Default CLI classification; add SCRIPT_INTERFACE for internal modules. |
|
||||
| scripts/render_iteration_directions.py | cli | False | True | True | False | False | True | False | Default CLI classification; add SCRIPT_INTERFACE for internal modules. |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"item_count": 15,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Skill OS 2.0 Audit
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"item_count": 21,
|
||||
"module_count": 8,
|
||||
"recommended_pr_count": 13,
|
||||
"pass_count": 21,
|
||||
"warn_count": 0,
|
||||
"pass_count": 20,
|
||||
"warn_count": 1,
|
||||
"missing_count": 0,
|
||||
"extension_track_count": 4,
|
||||
"extension_partial_count": 0,
|
||||
"extension_planned_count": 0,
|
||||
"extension_covered_count": 4,
|
||||
"adaptive_extension_ready": true,
|
||||
"local_blueprint_ready": true,
|
||||
"local_blueprint_ready": false,
|
||||
"public_world_class_ready": false,
|
||||
"world_class_evidence_pending_count": 4,
|
||||
"decision": "local-blueprint-covered-evidence-pending"
|
||||
"decision": "continue-implementation"
|
||||
},
|
||||
"status_counts": {
|
||||
"pass": 21,
|
||||
"warn": 0,
|
||||
"pass": 20,
|
||||
"warn": 1,
|
||||
"missing": 0
|
||||
},
|
||||
"extension_status_counts": {
|
||||
@@ -611,9 +611,9 @@
|
||||
"key": "evidence-consistency",
|
||||
"category": "recommended-pr",
|
||||
"label": "Evidence Consistency",
|
||||
"status": "pass",
|
||||
"status": "warn",
|
||||
"objective": "Recommended Skill OS 2.0 implementation PR from the upgrade plan.",
|
||||
"current": "35 consistency checks",
|
||||
"current": "36 consistency checks",
|
||||
"command": "make ci-test",
|
||||
"test": "tests/verify_evidence_consistency.py",
|
||||
"evidence": [
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Skill OS 2.0 Blueprint Coverage
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
- decision: `local-blueprint-covered-evidence-pending`
|
||||
- local blueprint ready: `true`
|
||||
- decision: `continue-implementation`
|
||||
- local blueprint ready: `false`
|
||||
- public world-class ready: `false`
|
||||
- pass: `21` / `21`
|
||||
- pass: `20` / `21`
|
||||
- missing: `0`
|
||||
- warn: `0`
|
||||
- warn: `1`
|
||||
- reference extensions: `4`
|
||||
- extension covered: `4`
|
||||
- extension partial: `0`
|
||||
@@ -48,7 +48,7 @@ This report maps the Skill OS 2.0 upgrade blueprint to concrete local artifacts,
|
||||
| Registry Package Format | `pass` | registry ok True | `make ci-test` | `tests/verify_registry_audit.py` |
|
||||
| Review Studio 2.0 | `pass` | 16 review gates | `make ci-test` | `tests/verify_review_studio.py` |
|
||||
| Migration V2 Docs | `pass` | migration guide present | `make ci-test` | `docs review` |
|
||||
| Evidence Consistency | `pass` | 35 consistency checks | `make ci-test` | `tests/verify_evidence_consistency.py` |
|
||||
| Evidence Consistency | `warn` | 36 consistency checks | `make ci-test` | `tests/verify_evidence_consistency.py` |
|
||||
|
||||
## Reference Extension Tracks
|
||||
|
||||
@@ -213,7 +213,7 @@ These extension tracks come from the user-supplied 2.0 reference plan. They are
|
||||
### Evidence Consistency
|
||||
|
||||
- objective: Recommended Skill OS 2.0 implementation PR from the upgrade plan.
|
||||
- status: `pass`
|
||||
- status: `warn`
|
||||
- existing evidence: `scripts/render_evidence_consistency.py`, `reports/evidence_consistency.json`, `tests/verify_evidence_consistency.py`
|
||||
- next action: Keep this item covered as the implementation evolves.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"ledger_ready_to_claim_world_class": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Claim Guard
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"schema_present": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Evidence Intake
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"decision": "evidence-pending",
|
||||
"ready_to_claim_world_class": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Evidence Ledger
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"audit_decision": "continue-iteration",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Evidence Plan
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"evidence_item_count": 4,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Evidence Preflight
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"summary": {
|
||||
"evidence_item_count": 4,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Operator Runbook
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"ok": true,
|
||||
"generated_at": "2026-06-13",
|
||||
"generated_at": "2026-06-17",
|
||||
"skill_dir": ".",
|
||||
"decision": "awaiting-submissions",
|
||||
"ready_to_claim_world_class": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# World-Class Submission Review
|
||||
|
||||
Generated at: `2026-06-13`
|
||||
Generated at: `2026-06-17`
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import json
|
||||
import subprocess
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
@@ -37,6 +38,22 @@ SCRIPT_INTERFACE = "cli"
|
||||
SCRIPT_INTERFACE_REASON = "Renders a cross-report evidence consistency gate for generated Skill OS reports."
|
||||
|
||||
|
||||
def git_worktree_status(skill_dir: Path) -> dict[str, Any]:
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
["git", "-C", str(skill_dir), "status", "--porcelain=v1", "-uall"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
except OSError:
|
||||
return {"available": False, "clean": None, "changed_file_count": None}
|
||||
if proc.returncode != 0:
|
||||
return {"available": False, "clean": None, "changed_file_count": None}
|
||||
changes = [line for line in proc.stdout.splitlines() if line.strip()]
|
||||
return {"available": True, "clean": not changes, "changed_file_count": len(changes)}
|
||||
|
||||
|
||||
def build_report(skill_dir: Path, generated_at: str) -> dict[str, Any]:
|
||||
reports: dict[str, dict[str, Any]] = {}
|
||||
text_reports: dict[str, str] = {}
|
||||
@@ -145,6 +162,32 @@ def build_report(skill_dir: Path, generated_at: str) -> dict[str, Any]:
|
||||
paths=[REQUIRED_REPORTS["benchmark"]],
|
||||
detail="The benchmark release lock must reflect the generation-time git dirty flag.",
|
||||
)
|
||||
current_git_status = git_worktree_status(skill_dir)
|
||||
if current_git_status.get("available") and current_git_status.get("clean") is True:
|
||||
compare_values(
|
||||
checks,
|
||||
key="benchmark-clean-worktree-release-lock",
|
||||
label="Clean worktree keeps a clean benchmark release lock",
|
||||
expected=True,
|
||||
actual=benchmark_summary.get("release_lock_ready"),
|
||||
paths=[REQUIRED_REPORTS["benchmark"]],
|
||||
detail=(
|
||||
"If the current worktree is clean, the committed benchmark report must not still carry a dirty release lock from an earlier generation."
|
||||
),
|
||||
)
|
||||
else:
|
||||
add_check(
|
||||
checks,
|
||||
key="benchmark-clean-worktree-release-lock",
|
||||
label="Clean worktree keeps a clean benchmark release lock",
|
||||
status="pass",
|
||||
expected="checked only when git is available and the current worktree is clean",
|
||||
actual=current_git_status,
|
||||
paths=[REQUIRED_REPORTS["benchmark"]],
|
||||
detail=(
|
||||
"Dirty or non-git worktrees cannot prove final release-lock freshness, so this check is advisory until the final clean-lock pass."
|
||||
),
|
||||
)
|
||||
skill_name = str(overview.get("name") or nested(review_studio, ["data", "frontmatter", "name"]) or skill_dir.name)
|
||||
expected_skill_ir_path = find_skill_ir_path(skill_dir, skill_name, require_schema=True)
|
||||
expected_skill_ir = {
|
||||
|
||||
@@ -423,6 +423,57 @@ def main() -> None:
|
||||
benchmark_flow_drift_checks["release-evidence-flow-covers-first-class-reports"]
|
||||
)
|
||||
|
||||
stale_clean_lock_root = TMP / "stale-clean-lock-skill"
|
||||
copy_reports(stale_clean_lock_root)
|
||||
benchmark_path = stale_clean_lock_root / "reports" / "benchmark_reproducibility.json"
|
||||
benchmark = json.loads(benchmark_path.read_text(encoding="utf-8"))
|
||||
benchmark["git_status"]["dirty"] = True
|
||||
benchmark["git_status"]["changed_file_count"] = 3
|
||||
benchmark["summary"]["release_lock_ready"] = False
|
||||
benchmark["summary"]["working_tree_dirty"] = True
|
||||
benchmark["summary"]["changed_file_count"] = 3
|
||||
benchmark["release_lock"]["ready"] = False
|
||||
benchmark["release_lock"]["reason"] = "working tree was dirty at generation time"
|
||||
benchmark_path.write_text(json.dumps(benchmark, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
for report_name in ["skill-overview", "skill-interpretation"]:
|
||||
report_path = stale_clean_lock_root / "reports" / f"{report_name}.json"
|
||||
report = json.loads(report_path.read_text(encoding="utf-8"))
|
||||
report["benchmark_reproducibility"]["summary"]["release_lock_ready"] = False
|
||||
report["benchmark_reproducibility"]["summary"]["working_tree_dirty"] = True
|
||||
report["benchmark_reproducibility"]["summary"]["changed_file_count"] = 3
|
||||
report_path.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
subprocess.run(["git", "init"], cwd=stale_clean_lock_root, capture_output=True, text=True, check=True)
|
||||
subprocess.run(["git", "add", "."], cwd=stale_clean_lock_root, capture_output=True, text=True, check=True)
|
||||
subprocess.run(
|
||||
["git", "-c", "user.name=Yao Test", "-c", "user.email=yao-test@example.com", "commit", "-m", "seed"],
|
||||
cwd=stale_clean_lock_root,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
)
|
||||
stale_clean_lock_proc = run(
|
||||
[
|
||||
sys.executable,
|
||||
str(SCRIPT),
|
||||
str(stale_clean_lock_root),
|
||||
"--output-json",
|
||||
str(TMP / "stale_clean_lock.json"),
|
||||
"--output-md",
|
||||
str(TMP / "stale_clean_lock.md"),
|
||||
"--generated-at",
|
||||
"2026-06-15",
|
||||
]
|
||||
)
|
||||
assert stale_clean_lock_proc.returncode == 2, stale_clean_lock_proc.stdout
|
||||
stale_clean_lock_payload = json.loads(stale_clean_lock_proc.stdout)
|
||||
stale_clean_lock_checks = {item["key"]: item for item in stale_clean_lock_payload["checks"]}
|
||||
assert stale_clean_lock_checks["benchmark-release-lock-self-consistency"]["status"] == "pass", (
|
||||
stale_clean_lock_checks["benchmark-release-lock-self-consistency"]
|
||||
)
|
||||
assert stale_clean_lock_checks["benchmark-clean-worktree-release-lock"]["status"] == "fail", (
|
||||
stale_clean_lock_checks["benchmark-clean-worktree-release-lock"]
|
||||
)
|
||||
|
||||
workflow_drift_root = TMP / "workflow-drift-skill"
|
||||
copy_reports(workflow_drift_root)
|
||||
studio_path = workflow_drift_root / "reports" / "review-studio.json"
|
||||
|
||||
Reference in New Issue
Block a user