Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/current-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ name: Current research site
- 'tests/test_current_site*'
- 'tools/node_status_refresh.py'
- 'tests/test_node_status_refresh.py'
- 'tests/test_node_status_freshness.py'
- 'cbz/evidence/node-status-freshness/run_mutations.py'
- 'tests/fixtures/node_status_refresh/**'
- '.github/workflows/current-site.yml'
schedule:
Expand Down Expand Up @@ -56,8 +58,13 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Offline freshness tests
run: python3 -B -m unittest tests.test_node_status_refresh
- name: Offline freshness tests and mutation controls
run: |
python3 -B -S -m unittest tests.test_node_status_freshness tests.test_node_status_refresh -v
python3 -B -O -S -m unittest tests.test_node_status_freshness tests.test_node_status_refresh -v
python3 -B -S cbz/evidence/node-status-freshness/run_mutations.py > "$RUNNER_TEMP/node-status-mutations.json"
# Pull requests run only the offline steps above. The live refresh reads the GitHub API,
# so it runs on main pushes, schedules and manual dispatch, never on a pull request.
- name: Report-only freshness refresh (read-only GitHub API)
if: github.event_name != 'pull_request'
env:
Expand Down
91 changes: 91 additions & 0 deletions cbz/evidence/node-status-freshness/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
## Current source update

See [parent-binding-20261029](parent-binding-20261029/README.md) for the subsequent
review-driven comment-parent and duplicate-JSON repair, current source hashes,
110 methods/mode (five existing skips), and 22 intended mutation kills. The
following original description and sibling receipts are historical predecessor
evidence, not claims that the updated source was used for the old live observation.

# Q-9006 bounded engineering repair — candidate, not closure

Base Main c93cec70223281492709ff74ca84fed5dc6e40e8. No canonical B-003
surfaces/catalog, production records or published projection changed.

## Contract and limits

CLI `cited-object-content-v1` compares each pinned blob/tree's Git type, mode
and object identity with the same path at one HTTPS-observed default HEAD per
repository. Each nonrecursive API tree must identify the requested object,
explicitly be untruncated, and have valid unique entries. Missing paths,
malformed/partial responses, symlinks and gitlinks are unknown/non-green.
Directory identity includes the complete cited subtree. Immutable pins remain
unchanged; unchanged content at different snapshot commits remains fresh.
Mutable discussions require matching object identity and valid timestamps;
newer is stale, earlier than recorded is unknown. Transport failures remain unknown.

This trusts GitHub HTTPS/API provenance and Git object identity, not a formally
verified network stack or cryptographic replay attestation. Test injection is
not authenticated observation. Report start/end times bound separate Git and
mutable-comment observations; there is no atomic federation snapshot or claim
that heads cannot advance afterwards. The report records heads and individual
source observations; failures are included as refresh_error rows.

`--check` means **all currently observed cited sources are fresh**, not “every
record's declared status is truthful”. It validates untouched production schema
first, rejects empty/invalid/stale/unknown domains and cannot write. Report-only
exit0 remains explicitly non-certifying. Legacy github_fetch/revision-token
injection remains available for historical callers; the production CLI instead
uses ContentObserver. The previous test expecting an older observed comment
timestamp to count fresh was tightened to unknown, not removed or weakened.

No original RealRecordTests method is changed. Its five skips remain. In
particular the unconditional live-head test is not called closed. Records
remain unchanged pending genuine current bound observations and source review.
Actual prior read-only object comparisons showed eng.hard-gate's cited directory
changed, so an all-fresh check must fail until a deliberate truthful disposition;
repinning to hide this result is forbidden. This tool certifies no mathematics,
source ownership, kernel result, or whole-federation G5.

## Tool registry fragment for canonical integrator

- Tool: tools/node_status_refresh.py, existing report/refresh CLI plus
ContentObserver and strict --check; purpose: eliminate snapshot-vs-last-touch
false freshness and expose non-green source observation results (Q-9006/G8).
- Usage: `python -B -S tools/node_status_refresh.py records/node_status`
(read-only report); append `--check` for strict all-fresh exit status.
Existing `--write` is explicit and incompatible with --check; this delivery
did not run it. Network reads use normal HTTPS trust, optionally GITHUB_TOKEN.
- Verification: commands below; owner none — self-contained, repository owned.
- Mutation experiment: run_mutations.py copies only needed source into a temporary
directory; requires each unmodified designated baseline to pass; accepts only
exit1 + intended named AssertionError, no error/import/syntax failure as kill.
Nine distinct source mutants executed in both modes;18 intended assertion kills.
This bounded engineering experiment is not a Layer-A auditor or proof of soundness.

## Reproduce

```
python -B -S -m unittest tests.test_node_status_freshness tests.test_node_status_refresh tests.test_living_project_validation
python -B -O -S -m unittest tests.test_node_status_freshness tests.test_node_status_refresh tests.test_living_project_validation
python -B -S cbz/evidence/node-status-freshness/run_mutations.py
```

Observed108 methods/mode:103 executed,5 existing real-record skips. Within that,
69 refresh/content methods execute,39 living-project methods include the5skips.
Initial RED includes8 explicit missing-feature assertions and unsupported--check
parser error; review RED separately reproduced future-time and schema-normalizing
false greens, both fixed. No claim that an argparse error is a mutation kill.
The broad project suite was not rerun in this bounded lane: previously denied
local browser execution must not be retried and parent owns hosted qualification.
No full G5, remote publish/merge, actual live CLI gate, record reconciliation,
or Q-9006 terminal closure is claimed.


Strict input custody: capture a bounded regular-file byte snapshot, validate and
observe exactly that snapshot in a temporary directory, report per-file SHA256,
and reject any final filename/byte drift in the original directory. An actual
adversarial-write RED during head fetch was reproduced then fixed; the9th mutant
removes that refusal. This binds the observed captured records, not future edits,
and assumes the running tool/validator/schema/graph/OS are trusted and not being
maliciously replaced during execution. Snapshot capture is not an atomic filesystem
transaction; cryptographic filesystem adversary resistance is not claimed.
25 changes: 25 additions & 0 deletions cbz/evidence/node-status-freshness/REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Independent engineering review

Reviewer: /root/assess_real_record_test_gaps/freshness_review (same-family
engineering review, no scientific independence credit). Read-only local review.

Final disposition: ACCEPT_SCOPED_ENGINEERING, 2026-10-29 ~21:00 UTC.
Independently replayed108methods/mode,103executed/fiveexisting skips, normal/-O.

Three actual defects were first reproduced and then fixed:
1. Invalid original source_rev/scientific_effect normalized into strict green.
2. An observed mutable-source timestamp older than recorded counted fresh.
3. Original input files could change during observation yet strict mode returned0.

Final strict mode validates and observes same captured bytes; bounded original
filename/byte snapshot compared after observation; hashes/drift reported and
nonzero on drift. Immutable sourcepins and kind/mode/blob-or-tree comparisons
preserved. No remaining blocking finding in inspected scope.

Reviewed tool SHA256:
a9a6f24af9917543bfe2010c530ae4fecc8da532291bfc2565efbbbce5334cd2
Reviewed new-test SHA256:
7404433c78eed00920d48305a3b774518dbfebec2e7aad701786d6759a75a82c

This review does not certify an actual network observation, the author's separate
mutation execution, wholeG5, or mathematics. Reviewer made no repository edits.
4 changes: 4 additions & 0 deletions cbz/evidence/node-status-freshness/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
a9a6f24af9917543bfe2010c530ae4fecc8da532291bfc2565efbbbce5334cd2 tools/node_status_refresh.py
70700c29887bdad09860e4bdf6dbe5e23d8d1432e4a3aa6e2c4f0632a08bbf51 tests/test_node_status_refresh.py
7404433c78eed00920d48305a3b774518dbfebec2e7aad701786d6759a75a82c tests/test_node_status_freshness.py
a1b8b29a0025dc72a19940b532b848cf2ecb5b7ed33e1f711acfad1fdde1f5fe cbz/evidence/node-status-freshness/run_mutations.py
13 changes: 13 additions & 0 deletions cbz/evidence/node-status-freshness/drift-red.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
F
======================================================================
FAIL: test_strict_rejects_input_drift_during_observation (tests.test_node_status_freshness.ContentTests.test_strict_rejects_input_drift_during_observation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 144, in test_strict_rejects_input_drift_during_observation
self.assertEqual(n.main([tmp,'--check']),1)
AssertionError: 0 != 1

----------------------------------------------------------------------
Ran 1 test in 0.012s

FAILED (failures=1)
113 changes: 113 additions & 0 deletions cbz/evidence/node-status-freshness/initial-red.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
FFFFFFusage: python -m unittest [-h] [--write] [records]
python -m unittest: error: unrecognized arguments: --check
EFF
======================================================================
ERROR: test_strict_empty_non_green (tests.test_node_status_freshness.ContentTests.test_strict_empty_non_green)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 65, in test_strict_empty_non_green
self.assertNotEqual(n.main([tmp,'--check']),0)
^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tools/node_status_refresh.py", line 346, in main
args = ap.parse_args(argv)
^^^^^^^^^^^^^^^^^^^
File "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/lib/python3.12/argparse.py", line 1908, in parse_args
self.error(msg)
File "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/lib/python3.12/argparse.py", line 2650, in error
self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
File "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/lib/python3.12/argparse.py", line 2637, in exit
_sys.exit(status)
SystemExit: 2

======================================================================
FAIL: test_access_error_unknown (tests.test_node_status_freshness.ContentTests.test_access_error_unknown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 58, in test_access_error_unknown
self.assertEqual(n.refresh_record(record(),self.observer())['status'],'unknown')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_changed_blob_is_stale (tests.test_node_status_freshness.ContentTests.test_changed_blob_is_stale)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 41, in test_changed_blob_is_stale
self.assertEqual(n.refresh_record(record(),self.observer())['status'],'stale')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_missing_path_unknown (tests.test_node_status_freshness.ContentTests.test_missing_path_unknown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 52, in test_missing_path_unknown
self.assertEqual(n.refresh_record(record(),self.observer())['status'],'unknown')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_mode_change_is_stale (tests.test_node_status_freshness.ContentTests.test_mode_change_is_stale)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 46, in test_mode_change_is_stale
self.assertEqual(n.refresh_record(record(),self.observer())['status'],'stale')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_partial_tree_unknown (tests.test_node_status_freshness.ContentTests.test_partial_tree_unknown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 49, in test_partial_tree_unknown
self.assertEqual(n.refresh_record(record(),self.observer())['status'],'unknown')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_snapshot_commit_difference_is_not_content_drift (tests.test_node_status_freshness.ContentTests.test_snapshot_commit_difference_is_not_content_drift)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 33, in test_snapshot_commit_difference_is_not_content_drift
obs=self.observer(); out=n.refresh_record(record(),obs,'2026-10-29T20:00:00Z')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_url_kind_mismatch_unknown (tests.test_node_status_freshness.ContentTests.test_url_kind_mismatch_unknown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 61, in test_url_kind_mismatch_unknown
self.assertEqual(n.refresh_record(rec,self.observer())['status'],'unknown')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

======================================================================
FAIL: test_wrong_response_identity_unknown (tests.test_node_status_freshness.ContentTests.test_wrong_response_identity_unknown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 55, in test_wrong_response_identity_unknown
self.assertEqual(n.refresh_record(record(),self.observer())['status'],'unknown')
^^^^^^^^^^^^^^^
File "/workspace/shared/cbz-recovery/freshness/tests/test_node_status_freshness.py", line 30, in observer
self.assertTrue(hasattr(n,'ContentObserver'), 'missing content-bound observer')
AssertionError: False is not true : missing content-bound observer

----------------------------------------------------------------------
Ran 9 tests in 0.003s

FAILED (failures=8, errors=1)
Loading
Loading