chore(sre): reconcile learning work item evidence

This commit is contained in:
Your Name
2026-07-19 01:20:12 +08:00
parent 8a01c62416
commit 52e40462cd
2 changed files with 28 additions and 10 deletions

View File

@@ -116,12 +116,12 @@ def test_loader_returns_fixed_architecture_provider_order_and_agent99_bridge() -
"total_items": 18,
"by_priority": {"P0": 16, "P1": 2},
"by_status": {
"source_implemented_runtime_pending": 8,
"in_progress": 5,
"source_implemented_runtime_pending": 9,
"in_progress": 4,
"planned": 4,
"policy_active": 1,
},
"source_implemented_items": 8,
"source_implemented_items": 9,
"runtime_closed_items": 0,
"program_completion_percent": 0,
"asset_coverage_status": "partial",
@@ -142,6 +142,12 @@ def test_ledger_links_confirmed_runtime_gaps_without_false_closure() -> None:
items["AIA-SRE-013"]["runtime_gaps"]
)
assert "host99 Agent99" in " ".join(items["AIA-SRE-017"]["runtime_gaps"])
assert items["AIA-SRE-015"]["status"] == (
"source_implemented_runtime_pending"
)
assert "production same-run receipt" in " ".join(
items["AIA-SRE-015"]["runtime_gaps"]
)
assert "atomic 17-file bundle" in items["AIA-SRE-017"]["next_action"]
assert "gitea-native" in " ".join(items["AIA-SRE-018"]["runtime_gaps"])
assert payload["completion_contract"]["evidence_layers"] == {
@@ -158,7 +164,7 @@ def test_projection_keeps_program_asset_and_runtime_truth_separate() -> None:
payload = load_sre_k3s_controlled_automation_work_items()
projection = build_sre_k3s_program_projection(payload)
assert projection["rollups"]["source_implemented_items"] == 8
assert projection["rollups"]["source_implemented_items"] == 9
assert projection["rollups"]["runtime_closed_items"] == 0
assert projection["rollups"]["program_completion_percent"] == 0
assert projection["domain_count"] == 8

View File

@@ -700,19 +700,31 @@
"title": "Incident closure 與 KM/RAG/MCP/PlayBook durable writeback",
"owner_lane": "LearningControlPlane",
"risk": "medium",
"status": "in_progress",
"status": "source_implemented_runtime_pending",
"dependencies": [
"AIA-SRE-014"
],
"source_refs": [
"apps/api/src/services/learning_service.py",
"apps/api/src/services/awooop_ansible_learning_writeback.py"
"apps/api/src/services/awooop_ansible_learning_writeback.py",
"apps/api/src/jobs/agent99_controlled_dispatch_reconciler_job.py",
"apps/api/src/services/agent99_controlled_dispatch_ledger.py",
"apps/api/src/services/agent99_telegram_lifecycle.py",
"apps/api/src/services/agent99_public_receipts.py",
"apps/api/src/repositories/knowledge_repository.py"
],
"executor": "learning writeback consumer",
"verifier": "durable same-run acknowledgement readback",
"rollback": "append-only correction event; immutable receipts are not overwritten",
"exit_condition": "closure requires all learning acknowledgements on the same run",
"next_action": "bind typed domain and verifier outcome into immutable learning receipt"
"confirmed_truth": [
"source and focused tests bind typed verifier outcomes to same-run Telegram, KM, RAG, MCP, PlayBook and backup DR scorecard acknowledgements",
"BackupCheck learning assets are reconciled idempotently as read-only DR evidence rather than controlled repair"
],
"runtime_gaps": [
"no exact deployed source, production same-run receipt or recipient-visible Telegram readback is recorded for this revision"
],
"next_action": "deploy one exact source revision and read back one same-run Telegram/KM/RAG/MCP/PlayBook/DR closure receipt; source evidence must not be counted as runtime closure"
},
{
"id": "AIA-SRE-016",
@@ -809,12 +821,12 @@
"P1": 2
},
"by_status": {
"source_implemented_runtime_pending": 8,
"in_progress": 5,
"source_implemented_runtime_pending": 9,
"in_progress": 4,
"planned": 4,
"policy_active": 1
},
"source_implemented_items": 8,
"source_implemented_items": 9,
"runtime_closed_items": 0,
"program_completion_percent": 0,
"asset_coverage_status": "partial",