Skip to content

Refresh MANIFEST.sha256 and guard it with a regression test (#108) - #109

Merged
CompleteDotTech merged 1 commit into
mainfrom
fix/108-refresh-manifest
Nov 13, 2026
Merged

CompleteDotTech merged 1 commit into
mainfrom
fix/108-refresh-manifest

Conversation

@CompleteDotTech

Copy link
Copy Markdown
Contributor

Problem

sha256sum -c MANIFEST.sha256 failed on main. 29 entries still named src/s1compiler/* paths that the rename in #89 removed, and 29 more had stale hashes. SETUP_PROMPT.md says to verify the manifest before making edits, and that check could not pass.

Change

This follows the coordinator's scoping decision on #108.

  • MANIFEST.sha256 refreshed in place. It still has 88 entries in the same <sha256> <path> format, sorted by path, with an LF trailing newline.
    • Mapped: 29. Every src/s1compiler/<x> entry now points to src/typewright/<x>. All 29 are renames in 9537ee3 (Rename the project to Typewright #89), checked with git show -M --name-status 9537ee3 and git log --follow. 19 are R100 renames whose hash is unchanged. The other 10 have new hashes because the files were edited during or after the rename. The mapped files:
      __init__.py, __main__.py, architect.py, backends.py, banking77.py, cli.py, compiler.py, data.py, errors.py, gepa_adapter.py, hardening.py, io.py, metrics.py, models.py, policy.py, py.typed, reporting.py, research.py, research_data.py, research_stats.py, research_teacher.py, runtime.py, templates/support/{DATASET_CARD.md, calibration.jsonl, sample_state.json, test.jsonl, train.jsonl, usecase.yaml, validation.jsonl}
    • Dropped: 0. Every missing entry had a renamed counterpart.
    • Recomputed (not renamed): 30. That is the 29 that were stale on main, plus tests/test_packaging_metadata.py, which this PR edits. docs/BUILD_REPORT.md was already stale and is edited here too; it was hashed last.
    • Added: 0. No file that was never listed has been added. The renamed hierarchy modules and templates from Rename the project to Typewright #89 were never in the manifest, so they are still not listed.
  • MANIFEST.sha256.as-shipped is byte-identical to origin/main.
  • Regression test test_manifest_sha256_matches_the_tree in tests/test_packaging_metadata.py:
    • Checks the line format, that entries are sorted with no duplicates, that every listed file exists, and that its sha256 matches the file bytes.
    • Skips when MANIFEST.sha256 is absent, for example in an sdist. Tests are not shipped in the wheel.
    • Also accepts the LF form of a text file that was checked out with CRLF (Windows core.autocrlf). Every listed text file is committed with LF and there is no .gitattributes. On Linux CI the raw bytes match directly.
    • The test file is itself listed in the manifest. That is not circular: the test does not embed any hash, so its entry is just recomputed after its final edit.
  • docs/BUILD_REPORT.md: the original sentence is kept. A dated follow-up note (November 13, 2026, MANIFEST.sha256 is stale on main: 32 hash mismatches, 29 pre-rename paths #108) is appended after it.
  • CHANGELOG.md: new Unreleased entry.

Checksums are not signatures. This attests only that the listed files match the current tree.

Validation (local, Linux, Python 3.14.8, dspy/gepa/typesafe-sdk/numpy absent)

  • pytest -q: 742 passed, 79 skipped. The baseline was 741 passed / 79 skipped; the new test accounts for the difference.
  • ruff check src tests examples: clean.
  • sha256sum -c MANIFEST.sha256 in the worktree: all 88 OK.
  • git archive HEAD | tar -x into an empty temp dir:
    • sha256sum -c MANIFEST.sha256: all 88 OK.
    • tests/test_packaging_metadata.py: 10 passed.
  • Negative checks in the extraction:
    • Appending a byte to docs/ROADMAP.md makes the new test fail.
    • Converting AGENTS.md to CRLF still passes, through the autocrlf fallback.

Not executed

No live, paid or provider calls; none are needed. Hosted CI results are those reported on this PR's checks only.

Closes #108

🤖 Generated with Claude Code

Map the 29 src/s1compiler/ entries to their src/typewright/ counterparts
(renamed in 9537ee3, #89) and recompute every stale hash, so
`sha256sum -c MANIFEST.sha256` passes again. The listed file set is
otherwise unchanged; no entries were dropped. MANIFEST.sha256.as-shipped
is untouched.

Add a test that fails when a listed file is missing or its hash is stale,
append a dated follow-up note to docs/BUILD_REPORT.md, and add a CHANGELOG
entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T05:53:22.896658Z 9987e7a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CompleteDotTech

Copy link
Copy Markdown
Contributor Author

Fresh-context review (round 1) of head 9987e7a

What I ran (local, Linux, Python 3.14.8, dspy/gepa/typesafe-sdk/numpy absent)

  • Full pytest -q on the PR head: 742 passed, 79 skipped. The baseline on origin/main c8e0e38 is 741 passed / 79 skipped, so the only difference is the one new test.
  • ruff check src tests examples: clean.
  • Hosted checks on this PR (core 3.11-3.14, optional-contracts 3.3.1/3.4.0): all pass. Both jobs run on ubuntu-latest only.

Independent verification

  • Clean git archive of the head, extracted to an empty dir: sha256sum -c MANIFEST.sha256 gives 88/88 OK. The manifest has no CR bytes, ends in LF, and is sorted in C (code-point) order, so it matches what the test's sorted() expects.
  • MANIFEST.sha256.as-shipped: cmp against origin/main:MANIFEST.sha256.as-shipped finds it byte-identical.
  • Same file set: I took main's path list, applied src/s1compiler/ → src/typewright/ and sorted it. The result is identical to the PR's path list: 88 paths, nothing added or dropped.
  • Renames are genuine: git show -M --name-status 9537ee3 lists all 29 mapped paths as R entries from src/s1compiler/X to src/typewright/X. 19 mapped entries keep their exact old hash, and the other 10 verify OK against the current files.
  • Recomputed entries: 29 non-s1compiler entries fail sha256sum -c on main. The PR changes the hash of exactly 30 non-s1compiler entries: those 29 plus tests/test_packaging_metadata.py, which this PR edits. No other entry changed. Of the listed files, only docs/BUILD_REPORT.md and tests/test_packaging_metadata.py differ in bytes between main and the head.
  • Historical docs: docs/BUILD_REPORT.md has additions only. The original "predates the rename and was not regenerated" sentence is kept and followed by a dated note. docs/BANKING77_VERIFICATION.md and other historical records are untouched.
  • Drift test, mutation checks on copies of the extracted tree:
    • Fails when:
      • one byte is appended to docs/ROADMAP.md
      • AGENTS.md is converted to CRLF and has a word changed
      • AGENTS.md is converted to CRLF and an extra line is added
      • a listed file is deleted
      • two lines are swapped
      • a line is duplicated
      • a garbage line is added
      • reports/resolved-lock-windows-py313.txt is normalized to LF
    • Passes when AGENTS.md is converted to CRLF only.
    • Skips when the manifest is absent.
    • The CRLF fallback only adds the CRLF→LF normalization of the bytes on disk. Any change beyond line endings still changes the digest and fails, so it cannot hide a content change.
  • AGENTS.md invariants: the PR does not touch the import boundary, source contract, splits, budget or identity checks. There is no eval/exec/pickle and there are no credentials. No results are claimed.

Findings

  1. NIT: the comment at tests/test_packaging_metadata.py:184 and the PR body are inaccurate. Both say "every listed text file is committed with LF". reports/resolved-lock-windows-py313.txt is listed, has no NUL bytes, and is committed with 77 CRLF line endings out of 97 lines. For that file, the test accepts two digests: the raw committed bytes and the LF-normalized form.
    • Failure scenario: someone recomputes that entry from an LF-normalized copy. The test still passes, but sha256sum -c MANIFEST.sha256 (the check SETUP_PROMPT.md:30 tells users to run) fails.
    • This is narrow and only involves line endings. Suggested fix: correct the comment, or only accept the LF digest when the raw bytes contain no CRLF in the committed blob.
  2. NIT: the test does not pin the file set.
    • Failure scenario: MANIFEST.sha256 is emptied or entries are deleted. I verified that an empty manifest passes test_manifest_sha256_matches_the_tree, because every check is vacuous over zero entries.
    • MANIFEST.sha256 is stale on main: 32 hash mismatches, 29 pre-rename paths #108 scoped the fix as "keep the same file set". The test guards hashes and existence but not silent removal of entries.
    • Possible fix: a minimum-count assertion, or asserting that a few known anchor paths are present (for example src/typewright/__init__.py and pyproject.toml).

Neither finding changes the correctness of the refreshed manifest. The acceptance criteria of #108 are met as scoped: in-place refresh, same file set, s1compiler paths mapped, as-shipped unchanged, drift test added.

REVIEW CLEAN

@CompleteDotTech

Copy link
Copy Markdown
Contributor Author

Coordinator: approved for merge on head 9987e7a. Review round 1 posted REVIEW CLEAN. All 6 required checks pass on this exact head, and the branch is up to date with main c8e0e38.

NITs left as noted, not fixed (fixing them would move the head and need another review round):

  1. tests/test_packaging_metadata.py:184 and the PR body say every listed text file is committed with LF, but reports/resolved-lock-windows-py313.txt is committed mostly with CRLF. Because of the CRLF allowance, the test would accept an LF-only recomputed hash for that file even though sha256sum -c would fail.
  2. The test doesn't pin the file set: an emptied manifest would still pass. A follow-up could add a minimum entry count or a few required paths.

@CompleteDotTech
CompleteDotTech merged commit d7b8de7 into main Nov 13, 2026
6 checks passed
@CompleteDotTech
CompleteDotTech deleted the fix/108-refresh-manifest branch November 13, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MANIFEST.sha256 is stale on main: 32 hash mismatches, 29 pre-rename paths

1 participant