diff --git a/.github/workflows/navigation.yml b/.github/workflows/navigation.yml index 9c4284c6f..028f0492f 100644 --- a/.github/workflows/navigation.yml +++ b/.github/workflows/navigation.yml @@ -12,6 +12,8 @@ jobs: timeout-minutes: 25 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + fetch-depth: 0 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 with: python-version: '3.11' @@ -25,6 +27,23 @@ jobs: python -B -S -m unittest discover -s tests -p 'test_*.py' -v > navigation-evidence/tests-normal.log 2>&1 grep -Eq '^Ran [1-9][0-9]* tests? in ' navigation-evidence/tests-normal.log || { echo "::error::navigation normal discovery collected 0 tests or returned no count"; exit 1; } python -B -S tools/navigation_check.py --verify-public > navigation-evidence/navigation.json + - name: Verify history-backed reader controls + run: | + set -euo pipefail + python -B -S -m unittest -v tests.test_reader_links.FiniteH0LifetimeReading tests.test_reader_links.UniversalitySourcesReading > navigation-evidence/history-reader.log 2>&1 + tail -n 3 navigation-evidence/history-reader.log | head -n 1 | grep -Eq '^Ran [1-9][0-9]* tests? in ' || { echo "::error::history reader suite collected no tests"; exit 1; } + tail -n 1 navigation-evidence/history-reader.log | grep -Fxq 'OK' || { echo "::error::history reader suite did not finish without skips"; exit 1; } + if grep -Fq ' ... skipped ' navigation-evidence/history-reader.log; then echo "::error::history reader test or subtest skipped"; exit 1; fi + for name in \ + tests.test_reader_links.FiniteH0LifetimeReading.test_pinned_items_carry_only_their_digest_and_the_digests_match_the_pinned_bytes \ + tests.test_reader_links.FiniteH0LifetimeReading.test_quoted_phrases_are_verbatim_in_their_pinned_sources \ + tests.test_reader_links.UniversalitySourcesReading.test_pinned_items_carry_only_their_digest_and_the_digests_match_the_pinned_bytes \ + tests.test_reader_links.UniversalitySourcesReading.test_process_marks_and_open_gaps_follow_the_records \ + tests.test_reader_links.UniversalitySourcesReading.test_quoted_phrases_are_verbatim_in_their_pinned_sources + do + method="${name##*.}" + grep -Fxq "$method ($name) ... ok" navigation-evidence/history-reader.log || { echo "::error::required history reader test missing or incomplete: $name"; exit 1; } + done - name: Preserve actual results including failures if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 diff --git a/BASELINE.md b/BASELINE.md index 5fd51a356..82d6b2cc6 100644 --- a/BASELINE.md +++ b/BASELINE.md @@ -6,6 +6,20 @@ This ledger binds the currently observed repository snapshot to the twelve owner criteria and final gate matrix. It records evidence and gaps; it is not a completion certificate. +## Navigation history candidate — 9 November 2026 + +The sequential base is Main `5ebe5771d44160f56d4f2fd1e11726858d17dc90`, +Math- `f532c3e2d91a0c7679a37c733741660917a9b21b`, and Workspace +`a3e6552104d89917105a668a296121680a7f03bc`, with Workspace pinning that Main +commit. The recorded hosted navigation run has 37 skips; twelve are history +object skip events. The candidate rejects that shallow-history outcome and +passed the two affected classes on a full clone. Hosted candidate execution was +not observed when this record was made. Other skip categories remain and +criterion 5 is not awarded. +All twelve criteria, final same-pass G0--G11, CBZ-0 and terminal Partial +remain unawarded. Evidence and split checkpoint durability are described in +[STATUS.md](STATUS.md#navigation-history-candidate--9-november-2026). + ## Current integrated v139 binding — 9 November 2026 | Repository | Current observed default revision | diff --git a/DECISIONS.md b/DECISIONS.md index 5947ea3af..ce26b2bdb 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -109,3 +109,4 @@ Append-only. Historical source outcomes remain in their original records. | 2026-11-09 06:08 | 2 | B/tooling | Recoverably retired eight documented historical Atlas browser drivers that had no current executable reference or exercise. All plans, reports, failures, authorship and scientific status remain unchanged; exact native recovery identities are registered in STATUS. Fresh committed-tree censuses in both modes are byte-identical, contain zero production findings, reduce the registry from 90 to 82 and the unresolved residue from 21 to 13, and still exit 1. The auditor passed 263/263 controls and killed 328/328 designated mutants per mode. Initial discovery commands without `-s tests` ran zero tests, exited 5 and receive no credit. Corrected complete discoveries ran 2,459 tests per mode and preserved exactly two managed Chromium singleton-socket errors and 23 skips, so G11 and full-regression 100% remain false. No theorem, proof, bound, axiom, kernel outcome, authorship, historical failure or scientific status changed; no CBZ criterion is awarded. | Yes | Base signed Main `31150f4a0736cb79bf33e366b6b725b061126000`, tree `b3f103e72a12cc766519c28bae92265162f2955e`; deletion commit `98dfecca599aa05b2007ec41d72fd605dd13f99e`, tree `c76a13d0b727f82beb5ee55d629c6d010785a334`; census SHA-256 `5a59528f3db330596c0b7df13d0bb03a95e2971183a1a008547cf42e09a2da80`; mutation receipt SHA-256 `e73ecb9f1a31208d4a92dfc5359e11ea8c6de833ab0df1495cc3c5675f05b97e`; full logs SHA-256 `2249bc0015f087432ca9a09572fc983b0a46d03ef80cad351d7455876888c955` / `b9a2d3fa3f12609284a9828e5c2b9aa95889220fb61e4c7291daa2d250e991e9`; durable v137 status/evidence SHA-256 `907b726558a856276cbeaf88bb3f521df9d7c27c975af847a6a8882ff186f770` / `00288242715743d878efec482a78920fc348b11e28223c49aa9bbb07a20c0307`. | | 2026-11-09 07:24 | 2 | B/tooling | Recoverably retired the final thirteen documented historical research/browser drivers that the current G11 graph did not execute. Exact native blobs remain recoverable; every plan, report, preserved failure, authorship record and product source remains unchanged. Fresh pre-change normal and optimized censuses were byte-identical and failed only on those thirteen tools. Exact deletion-tree censuses are byte-identical and pass with 69 tools, zero unresolved tools and zero production findings. The auditor passes 263/263 controls and kills 328/328 designated mutants per mode. Complete discovery passes 2,459 tests in each mode with 25 explicit skips; this does not award full-regression 100%. The G11 component is closed only for this exact candidate tree; final federation G11 and CBZ-0 remain unawarded pending current integration, pins, other gates, cold start and one-pass G0--G11. No theorem, proof, bound, axiom, kernel outcome, historical failure, authorship or scientific status changed. | Yes | Base signed Main `848cd66bbf4a73e77a6f3e1fff64ce4796150f6d`, tree `2f48833cbd051545be1a7d383137c99e5fa57a12`; deletion commit `26bd26594c6bf7d1678ae0ea40483b61e07fac61`, tree `473cd9a018993327536c6510ac78122eb830020f`; baseline/deletion census SHA-256 `5ce8979ff1b0ba1a5c77aaefcf276d135f4cc3d4314a4a00d9756cd3d2260342` / `793a7f09cdafb40b22283d284722a495628c22b707631ae0e887b10fb123adc6`; mutation receipt SHA-256 `e73ecb9f1a31208d4a92dfc5359e11ea8c6de833ab0df1495cc3c5675f05b97e`; full log SHA-256 `1cf4c2d78b85a7317e8e60e15a6fc382cc538950c6dc9ad65b57859c8a27a411` / `0d0122b4080e969d1d0795dde8a912d95c6aa2c52f3726999bb66fe261fee6d3`; durable v138 status/evidence SHA-256 `1f61a595a7bbbc0e4a3c661c3f860e0355c3fbe7db8c9d810ca42e25cff6f059` / `3af309a2ca2f951e5cca74f5647776822bb0de7459b0575ea0e9b486faae169c`. | | 2026-11-09 08:24 | 2 | B/status | Bound all five canonical reading surfaces to the signed Main #777 / Workspace #51 serial integration boundary and independently read-back durable v139. The current Workspace gitlink exactly matches Main; the organization-visible open-PR search returned zero. Author-observed G11 component execution passes with 69 tools, zero unresolved or production findings, 263/263 controls and 328/328 designated mutant kills per mode. Complete discovery passes 2,459 tests per mode with 25 skips, so full-regression 100% remains false. Preserved the landed HTTP-504 failure on attempt 1 and successful targeted retry on the identical signed commit. No theorem, proof, quarantine, bound, axiom, authorship, failure, kernel outcome or scientific status changed; no independent review is invented and no CBZ criterion is awarded. A later Main merge requires another guarded Workspace pin refresh. | Yes | Main `ed5d83b7eff354cd7025117f4d2371422acd816b`, tree `87fdabafadfdb1ee2b766222b6d0c313de8d9a89`; Workspace `7019083126d3e9fb732447dee5c2895d8c5b7475`, tree `5d591958e516a582367deb4433cbedf300207d7d`; Math- `f532c3e2d91a0c7679a37c733741660917a9b21b`; durable v139 status/evidence SHA-256 `68c00bab7590630ddaae8f67e0d9e1dc081d5168bc65809b18cce5cf0518affc` / `02e6efe1360f2e2b93ea9c64687db14b6b610961ca93434d1527665461c0fbb0`; landed workflow `42581324023` attempts 1 and 2. | +| 2026-11-09 17:33 | 2 | B/regression | Require full Main history and a separate no-skip execution of the two historical reader-source classes in the navigation workflow. The previously landed 2,459-test log records 37 skips, including twelve missing-history events; it remains preserved. The candidate shell block passed 20/20 on an actual full clone and rejected an actual depth-one clone with twelve skips. Focused controls passed 25/25 per mode. Nine designated workflow mutations per mode produced intended selected-body failures, with explicit helper/nested/subject-origin refusal controls. Earlier summary-spoofing false acceptances and the initial non-discriminating probe attempt remain recorded; no future hosted outcome is inferred. The existing full discovery and historical test contract remain. No theorem, proof, bound, axiom, authorship, historical failure or scientific status changed; all final criteria remain unawarded. Reversible in native Git; any later Main merge requires a guarded Workspace pin refresh. | Yes | Main base `5ebe5771d44160f56d4f2fd1e11726858d17dc90`; Workspace `a3e6552104d89917105a668a296121680a7f03bc`; workflow SHA-256 `fde0aab9cd82c5709f7970da2d5935a7cbeea2f1559725b4639fd5ad23a6c641`; landed artifact `13660495414`, SHA-256 `b2b93e4a1792fef2c994559baee9852927ed26f3a00484cd301eee99de0e6f5a`; qualification archive SHA-256 `6fa1b43e564baa27270e311f44b56cd2e580b2564c8253805789ab17f4c39fcf`. | diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 546de13e3..b16b6ffe6 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -18,6 +18,20 @@ Its team-model sections 1.5, 7.4 and 8 supersede older exclusive-owner and monitor-specific integration restrictions. Historical decisions retain their original timestamps and outcomes; the latest directive controls future action. +## Navigation history guard candidate — 9 November 2026 + +For history-backed reader checks, the navigation workflow must obtain the +required Git history and reject a missing, skipped or incomplete selected +reader suite. Preserve the full discovery log and a separate selected-suite +log, including failures; do not treat a successful but skipped suite as a +source-identity pass. The candidate's focused adverse controls and bounded +mutation observations are recorded in +[STATUS.md](STATUS.md#navigation-history-candidate--9-november-2026) and +[TOOLING.md](TOOLING.md#navigation-history-guard-candidate--9-november-2026). +This engineering rule neither changes mathematical requirements nor awards a +final regression or federation gate. Hosted execution was not yet observed +when this record was made and must be checked for the actual current head. + ## Current integrated v139 checkpoint — 9 November 2026 The current serial boundary is signed Main merge diff --git a/PROOF_INDEX.md b/PROOF_INDEX.md index a06496030..e8d0a6664 100644 --- a/PROOF_INDEX.md +++ b/PROOF_INDEX.md @@ -8,6 +8,15 @@ into a kernel proof. A theorem is CLOSED only for the literal statement and allowed-axiom boundary actually checked. Anything else must remain OPEN or be placed in a complete dormant quarantine. +## Navigation history candidate boundary — 9 November 2026 + +The candidate based on Main `5ebe5771d44160f56d4f2fd1e11726858d17dc90` +improves execution of historical reader-source identity checks. It changes no +theorem, proof source, statement, bound, axiom, quarantine or disposition. +The full/shallow observations and limits are in +[STATUS.md](STATUS.md#navigation-history-candidate--9-november-2026); they +are not Lean/kernel evidence, statement alignment or scientific review. + ## Current integrated v139 proof boundary — 9 November 2026 Signed Main `ed5d83b7eff354cd7025117f4d2371422acd816b`, tree diff --git a/STATUS.md b/STATUS.md index aa95fd5ce..86de9d886 100644 --- a/STATUS.md +++ b/STATUS.md @@ -8,6 +8,42 @@ The inherited scientific material below is explicitly the 29 September snapshot, not a fresh CLOSED decision or an empirical-validation receipt. Its mathematical statements, source cuts and review limits are preserved. +## Navigation history candidate — 9 November 2026 + +The candidate starts from signed Main +`5ebe5771d44160f56d4f2fd1e11726858d17dc90`. The last sequential Workspace +default `a3e6552104d89917105a668a296121680a7f03bc` pins that Main commit; +Math- remains `f532c3e2d91a0c7679a37c733741660917a9b21b`. At 17:33 UTC the +stable contribution status was v141. Its stable evidence archive was v139 after +two failed v140 transfer attempts; the v140 integration supplement is +`libfile_fde3_f-577788f2c9a88191a2493c330a8c0d2b_59a0f9f234e48191bc19fddcc0f80648`. +The status explicitly records this split; the archives are not a matched +single-version pair. + +Landed navigation artifact `13660495414`, SHA-256 +`b2b93e4a1792fef2c994559baee9852927ed26f3a00484cd301eee99de0e6f5a`, +recorded 2,459 tests and 37 skips, including twelve missing historical Main +Git-object skip events. The candidate requests a full checkout and adds a +separate fail-closed execution of the two affected reader classes. On an +actual full clone of the base, the new shell block passed 20/20 tests with no +skips; on a depth-one clone it exited 1 and retained the 20-test log with +twelve skip events. The existing full discovery remains unchanged. + +Focused workflow controls passed 25/25 in each Python mode. A local bounded +probe killed nine designated workflow mutants per mode, requiring each named +assertion to originate in the selected test body; body, helper, nested and +subject-origin controls checked that boundary. The probe is an evidence +artifact, not a general grading service. Its source, reports and both actual +history logs are in +`libfile_fde3_f-f232855b2dc081919315ab3c31a32f56_59a0f9f234e48191bc19fddcc0f80648`, +SHA-256 `6fa1b43e564baa27270e311f44b56cd2e580b2564c8253805789ab17f4c39fcf`. +At this record's creation, hosted candidate execution and integration had not +been observed; inspect the current pull request and its actual checks. The other +observed skip categories remain. No full-regression 100%, final G5/G11, +whole Layer A clearance, final G7, STATUS-only cold start, same-pass G0--G11, +CBZ-0, terminal Partial or scientific acceptance is claimed. Any later Main +merge requires a guarded Workspace pin refresh. + ## Current integrated v139 binding — 9 November 2026 The current serial integration boundary is signed Main merge diff --git a/TOOLING.md b/TOOLING.md index b0bdc3ee3..90eb8681b 100644 --- a/TOOLING.md +++ b/TOOLING.md @@ -9,6 +9,36 @@ preserved in their dated sections as history. Each entry states purpose, command, verification and scope. A component passing in isolation does not complete a CBZ gate or the final G0–G11 matrix. +## Navigation history guard candidate — 9 November 2026 + +Purpose: ensure the existing history-backed reader-source checks actually run +without skips in the navigation workflow. The workflow requests a full Git +checkout, records `navigation-evidence/history-reader.log`, requires a +positive final test count and clean final `OK`, and requires five named +source-identity tests. A missing suite, child error, skip or incomplete result +fails the step; the original full discovery and failure artifact are retained. + +From a Main checkout containing the candidate, run: + +```sh +python3 -B -S -m unittest -v tests.test_navigation_history tests.test_navigation_discovery tests.test_navigation_workflow +python3 -B -S -O -m unittest -v tests.test_navigation_history tests.test_navigation_discovery tests.test_navigation_workflow +python3 -B -S -m unittest -v tests.test_reader_links.FiniteH0LifetimeReading tests.test_reader_links.UniversalitySourcesReading +``` + +Local observations: 25/25 focused controls per mode; the actual full-history +selected suite ran 20/20 without skips, while a depth-one checkout produced +twelve skips and the exact shell block rejected it. Nine synthetic workflow +mutations were killed per mode with captured test-body assertion provenance; +four origin controls excluded helper, nested callback and subject failures. +The bounded probe source, commands, logs and limits are retained in the +qualification archive identified in +[STATUS.md](STATUS.md#navigation-history-candidate--9-november-2026). It is +not a general mutation grader. Hosted execution was not observed when this +record was made; inspect the actual current-head checks. This is a +source-identity engineering control, not a proof, scientific review, full +regression, final G5 or G11 admission. + ## Current integrated v139 tool binding — 9 November 2026 The bounded G11 commands below were actually observed at signed Main diff --git a/tests/test_navigation_history.py b/tests/test_navigation_history.py new file mode 100644 index 000000000..18bee1ae9 --- /dev/null +++ b/tests/test_navigation_history.py @@ -0,0 +1,143 @@ +"""Adverse controls for the navigation workflow's history-backed tests. + +The shell fixture supplies synthetic process results; it does not represent +GitHub execution or an actual historical-source check. +""" +from pathlib import Path +import json +import os +import shutil +import subprocess +import sys +import tempfile +import unittest + + +ROOT = Path(__file__).resolve().parents[1] +WORKFLOW = ROOT / ".github/workflows/navigation.yml" +MARKER = " - name: Verify history-backed reader controls\n run: |\n" +CLASSES = ( + "tests.test_reader_links.FiniteH0LifetimeReading", + "tests.test_reader_links.UniversalitySourcesReading", +) +REQUIRED = ( + ("FiniteH0LifetimeReading", "test_pinned_items_carry_only_their_digest_and_the_digests_match_the_pinned_bytes"), + ("FiniteH0LifetimeReading", "test_quoted_phrases_are_verbatim_in_their_pinned_sources"), + ("UniversalitySourcesReading", "test_pinned_items_carry_only_their_digest_and_the_digests_match_the_pinned_bytes"), + ("UniversalitySourcesReading", "test_process_marks_and_open_gaps_follow_the_records"), + ("UniversalitySourcesReading", "test_quoted_phrases_are_verbatim_in_their_pinned_sources"), +) +GOOD = "".join( + f"{method} (tests.test_reader_links.{cls}.{method}) ... ok\n" + for cls, method in REQUIRED +) + "\nRan 20 tests in 0.001s\n\nOK\n" +DRIVER = '''import json, os, sys +from pathlib import Path +with Path(os.environ["FIXTURE_TRACE"]).open("a") as stream: + stream.write(json.dumps(sys.argv[1:]) + "\\n") +data = json.loads(Path(os.environ["FIXTURE_RESULT"]).read_text()) +sys.stdout.write(data["output"]) +raise SystemExit(data["exit"]) +''' + + +class NavigationHistoryTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.workflow = WORKFLOW.read_text(encoding="utf-8") + cls.bash = shutil.which("bash") + if not cls.bash: + raise RuntimeError("Bash is required for navigation workflow controls") + + def block(self): + self.assertEqual(self.workflow.count(MARKER), 1, "history guard is missing or ambiguous") + block = self.workflow.split(MARKER, 1)[1].split("\n - ", 1)[0] + lines = block.splitlines() + self.assertTrue(lines) + self.assertTrue(all(not line or line.startswith(" ") for line in lines)) + return "\n".join(line[10:] if line else "" for line in lines) + "\n" + + def run_block(self, output=GOOD, exit_status=0): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + (root / "navigation-evidence").mkdir() + binary = root / "bin" + binary.mkdir() + driver = root / "fixture.py" + driver.write_text(DRIVER, encoding="utf-8") + shim = binary / "python" + shim.write_text('#!/bin/sh\nexec "$FIXTURE_PYTHON" -B -S "$FIXTURE_DRIVER" "$@"\n', encoding="utf-8") + shim.chmod(0o700) + result = root / "result.json" + result.write_text(json.dumps({"output": output, "exit": exit_status}), encoding="utf-8") + script = root / "run.sh" + script.write_text(self.block(), encoding="utf-8") + env = {key: value for key, value in os.environ.items() + if not key.startswith("PYTHON") and key not in ("BASH_ENV", "ENV", "SHELLOPTS", "BASHOPTS")} + env.update(PATH=str(binary) + os.pathsep + os.defpath, + FIXTURE_PYTHON=sys.executable, FIXTURE_DRIVER=str(driver), + FIXTURE_RESULT=str(result), FIXTURE_TRACE=str(root / "trace.jsonl")) + run = subprocess.run([self.bash, "--noprofile", "--norc", "-e", str(script)], + cwd=root, env=env, stdin=subprocess.DEVNULL, + capture_output=True, text=True, timeout=15) + trace = [json.loads(line) for line in (root / "trace.jsonl").read_text().splitlines()] + log = (root / "navigation-evidence/history-reader.log").read_text(encoding="utf-8") + return run, trace, log + + def test_checkout_requests_full_history(self): + self.assertIn(" - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1\n" + " with:\n fetch-depth: 0\n", self.workflow) + + def test_complete_history_suite_is_accepted_and_retained(self): + run, trace, log = self.run_block() + self.assertEqual(run.returncode, 0, run.stdout + run.stderr) + self.assertEqual(trace, [["-B", "-S", "-m", "unittest", "-v", *CLASSES]]) + self.assertEqual(log, GOOD) + + def test_missing_required_test_is_rejected(self): + first = GOOD.splitlines(keepends=True)[0] + run, _, log = self.run_block(output=GOOD.replace(first, "", 1)) + self.assertNotEqual(run.returncode, 0) + self.assertNotIn(first, log) + + def test_selected_test_skip_is_rejected(self): + bad = GOOD.replace(" ... ok\n", " ... skipped 'missing history'\n", 1) + run, _, log = self.run_block(output=bad) + self.assertNotEqual(run.returncode, 0) + self.assertEqual(log, bad) + + def test_subtest_skip_is_rejected_even_with_ok_summary(self): + bad = GOOD.replace("\nRan 20", " test_pinned (tests.test_reader_links.UniversalitySourcesReading.test_pinned) (url='x') ... skipped 'missing'\n\nRan 20") + run, _, log = self.run_block(output=bad) + self.assertNotEqual(run.returncode, 0) + self.assertEqual(log, bad) + + def test_empty_or_malformed_summary_is_rejected(self): + for replacement in ("Ran 0 tests in 0.001s", "no census"): + with self.subTest(replacement=replacement): + run, _, _ = self.run_block(output=GOOD.replace("Ran 20 tests in 0.001s", replacement)) + self.assertNotEqual(run.returncode, 0) + + def test_nonzero_child_exit_is_not_masked(self): + run, _, log = self.run_block(exit_status=23) + self.assertEqual(run.returncode, 23) + self.assertEqual(log, GOOD) + + def test_skipped_summary_is_not_accepted(self): + run, _, _ = self.run_block(output=GOOD.replace("\nOK\n", "\nOK (skipped=1)\n")) + self.assertNotEqual(run.returncode, 0) + + def test_earlier_ok_cannot_mask_nonclean_final_summary(self): + forged = GOOD.replace("\nRan 20 tests in 0.001s\n\nOK\n", + "\nOK\nRan 20 tests in 0.001s\n\nOK (expected failures=1)\n") + run, _, _ = self.run_block(output=forged) + self.assertNotEqual(run.returncode, 0) + + def test_earlier_positive_count_cannot_mask_empty_final_census(self): + forged = GOOD.replace("Ran 20 tests in 0.001s", "Ran 20 tests in 0.001s\n\nRan 0 tests in 0.001s") + run, _, _ = self.run_block(output=forged) + self.assertNotEqual(run.returncode, 0) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_navigation_workflow.py b/tests/test_navigation_workflow.py index 50e6d9b09..e2726b852 100644 --- a/tests/test_navigation_workflow.py +++ b/tests/test_navigation_workflow.py @@ -219,6 +219,20 @@ def test_filter_and_event_mutations_fail_closed(self): def test_entire_job_and_permissions_are_byte_preserved(self): suffix = self.workflow[self.workflow.index('permissions:'):] + # Restore only the two deliberate history additions before checking + # the prior byte contract; all pre-existing job bytes remain pinned. + checkout = (' - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1\n') + full_checkout = checkout + ' with:\n fetch-depth: 0\n' + self.assertEqual(suffix.count(full_checkout), 1) + suffix = suffix.replace(full_checkout, checkout, 1) + marker = ' - name: Verify history-backed reader controls\n run: |\n' + preserve = ' - name: Preserve actual results including failures\n' + self.assertEqual(suffix.count(marker), 1) + self.assertEqual(suffix.count(preserve), 1) + before, added = suffix.split(marker, 1) + history, after = added.split(preserve, 1) + self.assertTrue(history.strip()) + suffix = before + preserve + after self.assertEqual( hashlib.sha256(suffix.encode('utf-8')).hexdigest(), PRESERVED_JOB_SHA256,