Skip to content

docs: fold in review notes on rank erosion and the cloud setup guide (#1003) - #1004

Merged
t-uda merged 1 commit into
developfrom
ccr-eb669e62-a5kqoa
Nov 20, 2026
Merged

t-uda merged 1 commit into
developfrom
ccr-eb669e62-a5kqoa

Conversation

@t-uda

@t-uda t-uda commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1003

Summary

Hygiene follow-up to the final-head reviews of PR #996 and PR #1002, whose non-substantive notes were not pushed onto the reviewed heads.

  • docs/math/rank-erosion.md: the future-extensions paragraph now says which targets of the extension proposal are supplied (finite criterion, executable F₂ representations, certified finite test) and which remain proposed; four long lines rewrapped.
  • docs/README.md: the rank-erosion paragraph mentions the finite reduction and the certified F₂ test; attainment remains proposed.
  • CHANGELOG.md: the F2GridRep entry no longer says "no erosion test is included", which the next entry contradicted.
  • TDA/Persistence/F2GridErosionExamples.lean: docstring of emptyGrid_zero corrected; the module docstring says the same violation is reported with the other direction when the two modules are exchanged.
  • TDA/Persistence/F2GridErosion.lean: ErosionFailure and ErosionResult also derive Repr, so an outcome can be displayed with #eval.
  • docs/claude-cloud-setup.md: sandbox_status = ready means bwrap is on PATH, not that the Comparator's sandbox start-up probe passes; the initial value not-attempted is listed.

Branch lifecycle

Ordinary develop topic: based on develop 1b6c2d9d5906993aae4a7c33e87c010d1f1109dd, target develop, squash merge. Target scope: documentation hygiene; release version undecided. Propagation: N/A.

Public declarations added / changed

Added: the derived instances Repr (F2GridRep.ErosionFailure n) and Repr (F2GridRep.ErosionResult n). No statement, definition body, proof or pin changes.

Source ↔ Lean correspondence

N/A — no statement change.

Validation

Evaluated head 849fa1b3331a4a070bf91af1a3f94da4c90f9936, base 1b6c2d9d5906993aae4a7c33e87c010d1f1109dd.

  • Local scripts/check.sh (full gate) on this head: exit 0, CHECK OK; AXIOM AUDIT OK — 13593 declaration(s), PRIVATE AUDIT — 10503 private theorem root(s), COVERAGE OK — 10954 public theorems, all pinned, Comparator accepted (1m42s). The three counts equal the base's.
  • #eval runErosion interval zero (1/4) and (1/2) in a scratch file now print the failure record and pass.
  • git push pre-push gate: passed.
  • Hosted check for this head: success — https://github.com/uda-lab/tda-lib/actions/runs/44659726932/job/136034696818 ; the log reports AXIOM AUDIT OK — 13593 declaration(s), PRIVATE AUDIT — 10503 private theorem root(s), COVERAGE OK — 10954 public theorems, all pinned, Lean default kernel accepts the solution, CHECK OK, the same counts as the local run.
  • Not run: scripts/test-guards.sh, doc generation, the documentation site build beyond what hosted CI runs.

Remaining sorry / custom-axiom footprint

none

Independent review evidence

🤖 Generated with Claude Code

https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL

…1003)

Update sentences that still described a finite erosion test as only proposed,
correct two example docstrings, derive Repr for the erosion test results so
that an outcome can be displayed, and state what sandbox_status = ready means
in the cloud setup guide. No statement, proof or pin changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 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-20T02:19:21.839294Z 849fa1b 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.

t-uda commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Reviewed-by: claude-opus read-only reviewer (session distinct from the implementer)

Reviewed head: 849fa1b3331a4a070bf91af1a3f94da4c90f9936 (base develop 1b6c2d9d5906993aae4a7c33e87c010d1f1109dd), governed by #1003.

Compiled: one scratch file .agents/scratch/r1004.lean (ignored, deleted afterwards) importing TDA.Persistence.F2GridErosionExamples, elaborated with scripts/lean.sh lake env lean. #eval runErosion (ray 0) (ray 1) (1 / 2) prints ErosionResult.fail { firstWide := true, source := [(1 : Rat)/2], target := [1], wideRank := 1, narrowRank := 0 }; #eval runErosion (ray 0) (ray 1) 1 prints ErosionResult.pass; #synth Repr (ErosionFailure 1) succeeds; #print instReprErosionFailure shows an ordinary computable def; #print axioms instReprErosionResult gives [propext] only. (A third #eval on emptyGrid failed only because I did not open F2GridRepExamples; not retried.)

Verdict: pass — no substantive findings. Three non-substantive notes.

Findings

  1. NON-SUBSTANTIVE — item 4 only partly done. docs/math/rank-erosion.md:235 is now 118 characters ("declarations are in TDA.Persistence; the concrete hook witnesses are in its RankErosionWitness namespace, the grid"). The rewrap moved the over-long text instead of shortening it: the base line 232 was 113 characters. The other over-long base lines (166, 187, 216, 217) are fixed. Line 244 (83 characters, Puuska paragraph, not edited) is still slightly over the file's usual width of about 80.
  2. NON-SUBSTANTIVE — docs/claude-cloud-setup.md:7, "the initial value not-attempted remains if the setup is stopped before this stage runs". This holds for an external stop such as a signal or the hook timeout: write_status runs at scripts/claude-cloud-setup.sh:217, :311 and :351 while SANDBOX_STATUS='not-attempted' (:34). An unexpected command failure is different: the ERR handler (:199-201) rewrites the status as incomplete. Also, ready means that bwrap is found on SANDBOX_SEARCH_PATH (:27, :187-189, :554-562). That is $PATH unless the smoke-test override TDA_CLAUDE_SETUP_SANDBOX_PATH is set, so "on PATH" is accurate for normal use.
  3. NON-SUBSTANTIVE — docs/README.md:72-77. "For modules on finite grids the predicate reduces to finitely many grades" is shorthand for the left Kan extensions of such modules, which is what rankErosion_lan_iff_of_subset concerns. "decides it at a given rational radius" is accurate for valid representations and e ≥ 0 (runErosion_eq_pass_iff). Otherwise the test returns invalid (F2GridErosion.lean:159-164, runErosion_eq_invalid_iff); the real predicate is not defined there for that input. The README also mentions only "erosion-attainment" among the proposed extensions, while the guide lists five. This is incomplete but not false, and it matches what [docs] Fold in non-substantive review notes from #996 and #1002 (stale rank-erosion and cloud-setup sentences, Repr on erosion results) #1003 item 2 asks for.

Dispositions

  • Risk 1 (scope/contract): pass. The diff touches only the six files [docs] Fold in non-substantive review notes from #996 and #1002 (stale rank-erosion and cloud-setup sentences, Repr on erosion results) #1003 names. Items 1, 2, 3, 5, 6 and 7 are implemented as specified, and item 4 is partly done (finding 1). Nothing outside the contract changed. In the two Lean files the diff is only docstring text (F2GridErosionExamples.lean:12, :170-172) and the two deriving DecidableEq, Repr clauses (F2GridErosion.lean:132, :156). No statement, definition body, proof or pin line changed.
  • Risk 2 (accuracy): pass.
    • (a) rank-erosion.md:217-227: "the three preceding sections" are §§ Finite test grids (:86), Executable representations (:134) and A certified finite test (:162), all supplied. The five items called "proposed" are absent from the library: the strict-pair caveat is at :244-245; the attainment and other-fields caveats are at :199-202; ranks use finrank; F2GridRep has no consumer besides the aggregator and examples.
    • (b) See finding 3.
    • (c) The F2GridRep CHANGELOG entry (CHANGELOG.md:51-57) is accurate on its own and no longer contradicts the runErosion entry.
    • (d) emptyGrid has values := [] (F2GridRepExamples.lean:149-152), so it has no grid grade and its Kan extension is zero. zero has values := [0] (F2GridErosionExamples.lean:28-31). erosionBreakpoints at e = 1 gives [0, 1, -1], which is the second grid's value and its shifts. The docstring is correct.
    • (e) rays_half and rays_half_swapped (:101-106) report the same pair and ranks with firstWide true and false, so the docstring is correct.
    • (f) The ready and not-attempted statements are accurate apart from the precision note in finding 2. The start-up probe statement matches check-comparator.sh:244-262: ready checks only command -v bwrap, and the separate bwrap --unshare-all … /bin/true probe exits 2 on failure.
  • Risk 3 (deriving Repr): pass. No new import. Repr (Fin n → ℚ) resolves from the existing imports, and the derived instances are computable defs with axioms [propext] only. DecidableEq is still derived in the same clause. Instances are definitions, not theorems, so no new coverage pin is needed. This agrees with the unchanged coverage count 10954.
  • Risk 4 (hygiene): pass. No maintenance history or chronology was added. Dropping "next-release" from the proposal link removes time-relative wording. The rewrapped lines read correctly. Links resolve: math/rank-erosion.md, the anchors #executable-representations-over-the-two-element-field and #a-certified-finite-test (headings at :134 and :162), and issue [Multi PH milestone] Extend rank erosion and certify finite tests #865. Lean lines in the two edited files are within 100 characters, counted as Unicode code points.

Checks not performed

I did not run lake build, scripts/check.sh or the pre-push gate (I relied on the gate evidence reported for this head). I did not check hosted CI check status, the rendered Markdown, or doc-gen4 output. I did not elaborate the emptyGrid_zero #eval.


Generated by Claude Code

@t-uda
t-uda merged commit 0a49f5b into develop Nov 20, 2026
4 checks passed
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.

2 participants