KB-729F

dot-iu-cutter v0.5 — Constitution Snapshot-source MARK Branch Patch Test Result (7/7 non-fixture PASS vs byte-exact dryrun.py; 14 ERROR = absent out-of-scope fixture)

4 min read Revision 1

dot-iu-cutter v0.5 — Constitution Snapshot-source MARK Branch Patch Test Result

Phase: …_branch_patch_apply_CI · Nature: local_unittest_only__no_DB__no_dryrun · Date: 2026-05-18 · doc 2 of 4

runner: python3 -m unittest  (pytest NOT installed; stdlib unittest used)
non_fixture_subset: 7/7 PASS  (exercises BYTE-EXACT dryrun.py f1f42e83…)
fixture_bound: 14 ERROR — FileNotFoundError on out-of-scope absent fixture
production_touched: false ; db_write: NONE ; first_dryrun: NOT executed

1. Environment

python: 3.11.6        pytest: ABSENT -> used `python3 -m unittest`
module_under_test: cutter_agent/dryrun.py  sha256 f1f42e83… (BYTE-EXACT to KB)
test_file: tests/test_dryrun_snapshot_mark.py sha256 454d9fc8… (NOT byte-exact;
  see apply-log §5 — results below still validate the byte-exact module logic)

2. Full module run — python3 -m unittest -v tests.test_dryrun_snapshot_mark

Ran 21 tests in 0.005s
FAILED (errors=14)
result_breakdown:
  ERROR x14  -> ALL FileNotFoundError at TestGate/TestManifest.setUp:
       constitution-normalized-17660443e0f23e99.md  (the PINNED snapshot
       fixture). This fixture is OUT OF PHASE SCOPE — task authorizes ONLY
       adding cutter_agent/dryrun.py + tests/test_dryrun_snapshot_mark.py;
       adding the snapshot artifact is NOT authorized. => environmental,
       NOT a code defect, NOT a logic regression.
       (TestGate x5, TestManifest x9 = 14)
  OK    x7  -> the fixture-independent tests (see §3)

3. Non-fixture subset — clean run (the meaningful local CI here)

python3 -m unittest -v tests.test_dryrun_snapshot_mark.TestFailClosedSynthetic tests.test_dryrun_snapshot_mark.TestNoDbImportIsolation

test_nt_out_of_order_fails_closed ............... ok
test_orphan_row_before_group_fails_closed ....... ok
test_synthetic_happy_path_cascade ............... ok
test_unknown_marker_fails_closed ................ ok
test_cli_refuses_without_no_db_flags ............ ok   (stderr: REFUSED: --no-db-write… mandatory)
test_cli_refuses_wrong_mode ..................... ok   (stderr: REFUSED: only --mode mark-manifest-only)
test_module_imports_only_stdlib ................. ok
----------------------------------------------------------------------
Ran 7 tests in 0.004s
OK
TestFailClosedSynthetic: 4/4 PASS   (unknown-marker / orphan-row / NT-out-of-order
  fail-closed; synthetic happy-path 15 NT + 3 KT + tier_1 DIEU + reconstruction)
TestNoDbImportIsolation: 3/3 PASS   (AST proves dryrun.py imports ONLY
  argparse/hashlib/json/os/re/sys/pathlib/__future__; no psycopg/socket/requests/
  sqlalchemy/cutter_agent; CLI refuses wrong mode & missing no-db flags)
import_audit (independent): imports = ['__future__','argparse','hashlib','json',
  'os','pathlib','re','sys'] ; stdlib_only = True
interpretation: the BYTE-EXACT entrypoint module dryrun.py is functionally
  correct & import-isolated (no DB / no CUT / no VERIFY possible).

4. Existing tests

not_run: tests/test_real_postgres_adapter.py — requires a real Postgres; running
  it risks a DB connection. Phase forbids DB access -> deliberately SKIPPED (safe).
not_run (this phase): test_idempotency / test_phase_contracts /
  test_security_boundaries / test_state_machine — out of the additive entrypoint's
  surface; deferred to keep scope tight under a BLOCKED apply. (dryrun.py is
  import-isolated from all of them, so no interaction risk.)

5. Verdict

new_entrypoint_logic: VALIDATED (7/7 fixture-independent PASS on byte-exact module)
full_fixture_CI: NOT POSSIBLE this phase (pinned snapshot fixture out of scope/absent)
test_artifact_byte_faithful: NO (454d9fc8… != 31143968…) -> apply BLOCKED (doc 1 §5)
commit: NONE (guard: tests-not-fully-green AND byte-faithfulness fail -> no commit)

doc 2 of 4. Self-advance PROHIBITED.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.5-constitution-snapshot-source-mark-entrypoint-branch-patch-apply-ci/dot-iu-cutter-v0.5-constitution-snapshot-mark-branch-patch-test-result-2026-05-18.md