refactor: 문서 개선 중

This commit is contained in:
donghyeon-ka
2026-09-21 14:30:55 +09:00
parent c93cdea150
commit 805a18f486
1497 changed files with 525837 additions and 59152 deletions
+36 -2
View File
@@ -85,6 +85,39 @@ class LedgerTest(unittest.TestCase):
p = _cli("gate", self.led, "--stage", "S3", "--cmd", "x")
self.assertNotEqual(0, p.returncode)
def test_unverifiable_gate_keeps_the_real_failure_receipt(self):
p = _cli(
"gate", self.led, "--stage", "S3",
"--cmd", "node check_evidence.mjs demo --repo", "--exit", "3",
"--semantic-id", "evidence-repo", "--status", "UNVERIFIABLE",
"--reason", "source repository unavailable on current machine",
"--accepted-by-project-review",
)
self.assertEqual(0, p.returncode, p.stderr)
gate = self._stage("S3")["gates"][0]
self.assertEqual("evidence-repo", gate["semanticId"])
self.assertEqual("UNVERIFIABLE", gate["status"])
self.assertEqual(3, gate["exit"])
self.assertTrue(gate["acceptedByProjectReview"])
def test_unverifiable_gate_needs_a_reason(self):
p = _cli(
"gate", self.led, "--stage", "S3", "--cmd", "x", "--exit", "3",
"--status", "UNVERIFIABLE",
)
self.assertEqual(2, p.returncode)
self.assertIn("--reason", p.stderr)
def test_gate_status_cannot_lie_about_the_exit_code(self):
self.assertEqual(2, _cli(
"gate", self.led, "--stage", "S3", "--cmd", "x", "--exit", "3",
"--status", "PASS",
).returncode)
self.assertEqual(2, _cli(
"gate", self.led, "--stage", "S3", "--cmd", "x", "--exit", "0",
"--status", "FAIL",
).returncode)
# ── 끊겨도 이어진다 ──────────────────────────────────────────────
def test_the_file_is_never_half_written(self):
"""쓰는 도중에 죽여도 읽는 쪽은 이전 판이나 다음 판 중 하나를 본다."""
@@ -286,7 +319,8 @@ class EchoAgainstSkillHistory(unittest.TestCase):
"""S3 의 영수증만 갈아 끼운, 그 밖에는 흠이 없는 원장."""
run = json.load(open(vpr.TEMPLATE, encoding="utf-8"))
run.update({"runId": "2026-01-01-0000", "project": "demo",
"record": "CLAUDE.md", "startedAt": "2026-01-01T00:00:00+09:00"})
"record": "CLAUDE.md", "startedAt": "2026-01-01T00:00:00+09:00",
"schemaVersion": vpr.AGENT_RUNBY_SCHEMA})
for st in run["stages"]:
spec = vpr.STAGES[st["id"]]
if not carry_field:
@@ -469,7 +503,7 @@ class RunByNamesAManagedAgent(unittest.TestCase):
p = _cli("open", led, "--project", "demo", "--record", "docs/demo/x.md")
self.assertEqual(0, p.returncode, p.stderr)
run = json.load(open(led, encoding="utf-8"))
self.assertEqual(vpr.AGENT_RUNBY_SCHEMA, run["schemaVersion"])
self.assertEqual(vpr.CURRENT_RUN_SCHEMA, run["schemaVersion"])
for st in run["stages"]:
self.assertEqual(vpr.STAGES[st["id"]]["agent"], st["runBy"])