Repository navigation
Sketch text: text in sketches (TTF/CFF fonts), the winding and text proofs, rustfmt - #19
David-Bascom05 wants to merge 37 commits into
Conversation
…s (A ring, C and c cedilla);
two characters meeting is Text GlyphsMeet; spacing:
- forge-font: Font::outline_parts tells each contour's top-level component; layout carries it
and takes a tracking (font units) between characters.
- forge-sketch: profiles_in_groups takes regions one group (a glyph's part) at a time; parts of
one glyph may overlap, the feature's boolean making their union; loops of different glyphs
must neither cross nor touch (ExtractError::Meet), checked box first.
- forge-lang: a list of loops extrudes per element and part (Sk::text_segs); Meet between
characters is FeatError::Text GlyphsMeet {a, b}, its text naming spacing:; text(.., spacing: d).
- Tests: Å, Ç, ç regular and bold valid; bold VW refused as GlyphsMeet and built with spacing;
text bits unchanged native and wasm. OCCT: accented text raised and cut agree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…e, no toolchain) and its CI workflow; README with the proof levels Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…space Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…n, every line's own functions at or below base Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…ode_closes, winding_from_any_start and refuses_meeting proven; WindingIsTopological listed as open - Contour: the TrueType walk's invariant (pieces chain from the start, end at the pen); a contour ending on its start closes. - Winding: polyWinding as the total of its sides' crossings; rotating the vertex list keeps it. - Region: the pair check before a text is set; passing it, no two glyphs' loops meet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…e22b62, copied unchanged) - Topological.lean: off the polygon, lineCross is winding2d's half-open cross on the points cast to rationals (its refusal only on the side: onSeg_of_within), the sides are winding2d's (sides_toQ), so polyWinding = wind (polyWinding_eq); winding_is_topological follows from wind_simple_mem and wind_eq_of_seg. - verify/winding2d copied byte for byte from claude/repo-review-mbdrlj-winding2d at ae22b62 and required by path; Cargo excludes it, as that branch does; the workflow watches it. - README: the row closed, with what it does not cover (curve pieces; Simple's stricter rule against self-touching loops, which the shipped faces do not break as far as checked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…e (Latin-1, three faces), by a check that is shown to find pinches, interior touches, doubling back and curve crossings; forge-text README: hull subdivision listed as L5 open Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…re (glyf_core.rs), translated by Aeneas (22 definitions, none opaque; the Lean elaborates); bits identical - glyf_core: read_simple and contour on the doubled grid (an implied point made once, exactly), written to research/aeneas/STYLE.md (no early return inside a loop, no closure that captures, no iterator adaptor); the float shell maps the pieces. Every glyph of the shipped faces hashes as before; forge-font tests pass in debug (no overflow) and release. - verify/aeneas/forge-font: translate.conf, the translation, a lake project requiring the bridge and verify/forge-text. - tools/aeneas, verify/aeneas/bridge, verify/aeneas/README.md and verify/ieee754 copied byte for byte from claude/repo-review-mbdrlj-aeneas (422b66a); Cargo excludes verify/ieee754 and verify/aeneas as that branch does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzyxEjALvQNpHRRB9jW
…ify/forge-text (contour_spec: the translation is contourOf of the points; contour_closes); forge-text: contourOf and contourOf_closes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…s; n ends below 2^16, on/xs/ys as many as the last end says) and composed with the walk (contour_of_read) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…f64 min/max defined, orient2d opaque) and proven to be forge-text's lineCrossQ on the doubles' values (line_spec), lineCross on grid points (line_int); forge-text: lineCrossQ, lineCross_toQ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…e.rs: 2^-16 units, an explicit frame stack for subroutines, error codes), the shell mapping its points to f64 exactly; every glyph of the three shipped faces bit-identical; translated by Aeneas (std's Vec default/clear/pop and mem::take defined in FunsExternal.lean); its pen and operators proven (Cff.lean: every kept contour closed, no overflow), the main loop next Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…s, any charstring range and any subroutine INDEXes, run never fails and every contour it returns is closed); one step of the machine moved into one() and flex split per operator for the proof; bits identical on every shipped glyph, exact gate at or below 063a9e0 on every line (research/sketch-text/gate-cff-core.txt); research/sketch-text/hull-margin.md: winding.rs bezier's margin does not cover the rounding a small piece of a large curve carries (22x over in hull_margin_probe.py), and the fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…eljau midpoint's rounding (mid_err) and one projection's (proj_err); the depth induction waits on the margin question (research/sketch-text/hull-margin.md) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
… (max(big, big0)), not the current one: a small piece of a large curve carries its ancestors' rounding (research/sketch-text/hull-margin.md); a decision can only become a split or unknown Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
# Conflicts: # Cargo.toml # tools/aeneas/leancheck.sh # tools/aeneas/patches/aeneas-robust.patch # tools/aeneas/survey.sh # tools/aeneas/translate.sh # verify/aeneas/bridge/AeneasF64.lean # verify/aeneas/bridge/AeneasF64/Std.lean # verify/ieee754/IEEE754.lean # verify/ieee754/IEEE754/Axioms.lean # verify/ieee754/IEEE754/Dmath/RemPio2.lean # verify/ieee754/README.md
…urce line moved) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…fontTools do (formats-corpus #8); the shipped faces' bits unchanged; research/sketch-text/whats-left.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzxtJa6tLP1QdvbzoDY
…drlj-rebase-sketch-text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q19LzwNsyud6vAkdXNzrtJ
tools/aeneas/translate.sh --all at the pinned Charon/Aeneas. Only the Source line ranges in cff_core.rs moved (sixes, curves, Frame, Machine); no definition changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cargo.toml: the workspace exclude list keeps both sides' entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (call branch proven apart as call_spec) Merging main (589c390) put all of Mathlib under the bridge (verify/ieee754's new Exact/Gcd, Exact/Limbs, Exact/QHenrici and Interval/Trig `import Mathlib`), and one_spec, whose heartbeats count for the whole declaration, went past 200000. The translation is unchanged (4cea860 moved only Source lines). The subroutine call, the same for callsubr and callgsubr, is now one theorem (call_spec) used twice, and two nlinarith on linear goals are omega. one_spec now checks within 100000 heartbeats, call_spec within 60000; no theorem changed, no option raised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJtawy4xUrjummxsFx8wFP
|
@codex Please integrate this sketch-text PR with current main in a separate Codex Cloud coding session on its own VM. Preserve the sketch text feature, proofs and current main changes when resolving the Cargo and proof conflicts. Verify the proof dependencies, all required Lean suites, sketch-text tests, bit identity and current exact performance gates. Attribute and address any over-band lines before requesting merge. Push a reviewable fix and report the exact tested base and head here. Leave the merge to the merge lead. |
|
To use Codex here, create an environment for this repo. |
# Conflicts: # Cargo.toml # tools/aeneas/survey-modules.sh # verify/aeneas/bridge/AeneasF64/Core.lean
|
@codex review the sketch text and proof integration on the updated head against current main, particularly font winding and the proof bridge. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17dce34d09
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| found: Ty::List, | ||
| })?; | ||
| let ps = sk.borrow().profiles_among(&ids, span)?; | ||
| let ps = sk.borrow().profiles_grouped(&elements, span)?; |
There was a problem hiding this comment.
Preserve nesting for lists of ordinary sketch loops
For a list of non-text loops, such as extrude([sk.outer, sk.inner], h) with nested rectangles, this replaces joint contour nesting with independent profile extraction for each element. Both rectangles consequently become filled profiles and are unioned, whereas the previous profiles_among(&ids, ...) made the inner rectangle a hole. Cuts likewise remove the interior that should remain. Restrict the new glyph/component grouping semantics to text entities, preserving joint nesting for ordinary loop lists.
Useful? React with 👍 / 👎.
| - name: build and axioms | ||
| run: | | ||
| lake build |
There was a problem hiding this comment.
Run dependent proof bridges on specification-only changes
When a PR changes only verify/forge-text/** or verify/winding2d/**, this workflow builds the specification package but not the new ForgeFont and ForgeSketch bridges that import it. The existing .github/workflows/aeneas.yml path filters include neither directory, so that workflow does not run either. Consequently, specification changes can pass all triggered proof checks while breaking contour_spec or line_spec. Add these new dependency paths to the Aeneas workflow filters, or build the dependent bridge packages here.
Useful? React with 👍 / 👎.
|
@codex review the updated head on current main with the generated sketch source location refreshed. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review the subdivision leaf scan. It retains the first sign change, crossing parity and earliest minimum in traversal order. All 146 release geometry library tests passed. Current-base CI will measure bits and costs. |
|
@codex review the final leaf-scan candidate with old-subdivision-leaves available for bisection. Regression coverage compares both classifiers on 162 sign, tie and disconnected-group cases. |
|
Coordinator UI scope check requested for the sketch-text diagnostics. The renderer diff adds one diagnostic arm in shell/sketching/rows.rs; the new text errors also reach the user through the existing feature error display. Please record sign-off or required revisions under the handoff UI rule. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Please independently verify the exact new head, including shared empty segment lifetimes and text versus ordinary profile grouping. All 11 sketch-text regressions passed. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Please review the new exact head. A single checked loop has no containing loop or children, so it now goes directly into the same normalization without cloning itself or allocating nesting tables. All 25 sketch-kernel and 11 sketch-text tests passed. The Aeneas source references follow the leaf classifier movement. The profiled geometry and official exact performance gates still apply. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The full subdivision differential finished. I compared both sets of raw JSONL records from all four shards, retaining every non-timing, non-resource field and each record multiplicity. All 146 archives and 196 STEP files matched with zero geometry or outcome differences between the buffered-classifier baseline b23ecc5 and the optimized 9f5e094. Current-head language, performance and CI gates are separate. https://github.com/David-Bascom05/forgeCAD/actions/runs/45765093045 |
|
@codex review 9784df2. Please independently check the shared Lean min/max signed-zero model, the sketch proofs, and the disjoint-curve early exit. The early exit avoids computing endpoint distances after an empty intersection. All 25 sketch tests and 11 sketch-text integration tests passed locally. The previous protected performance run exceeded the per-part limit on five rows. The new candidate still needs its own protected proof, performance and geometry results and coordinator review of the diagnostic wording. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The protected performance gate on candidate The three higher copy costs trace to glibc moving buffers during reallocation. For heatsink/CLI, growing the mass accumulator and Boolean imprint wall buffers incurred 41,223 and 31,072 additional inclusive instructions with the same number of growth calls. On hub/app, the allocator used 46,728 more inclusive instructions in consolidation with the same call count. The table lists the net after removing benchmark startup and the largest exclusive increases and offsets for all 16 higher paths, including the diagnostic regen rows. Inclusive and exclusive figures count different work and should not be added together.
Protected gate · Paired hosted profiles · Independent sketch proof check |
|
@codex review f7efcc4. Please check the exact buffer capacities for the face-run accumulators, imprint walls and per-face coedge index, the chamfer corner allocation estimate, and the removal of the duplicate Lean Vec.clear definition. The shared definition has the same type and body. All 41 Boolean library tests passed. On the hosted allocation trial, three of four over-band rows recovered. Geometry bits matched main. The strict total fell 0.1772%, with hub/app still +0.0584%. Its heap profile showed coedge index buffer growth. The final change reserves exactly one entry per coedge before filling that index. Fresh CI governs this head, and the coordinator's sketch diagnostic sign-off is still outstanding. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
On candidate One strict case still exceeds the 0.03% limit. Coplanar/nary1 ran 150,035,913 instructions versus 149,974,310 on main (+61,603, +0.0411%). Its largest increases in self instructions were 45,143 in glibc allocation, 21,941 in face-query initialization and 13,896 in iterator reduction. Computing the exact edge count first walks all face loops before the traversal that actually constructs the edge cache. I am measuring a single traversal that reserves each loop's known number of coedges before processing it. The trial preserves traversal and edge order and is outside this PR pending measurement. |
What
sketch-text 5557c8f, merged with main ec32818 by the rebase stream (0870264; no conflicts), then rustfmt of forge-font cff.rs, cff_core.rs and lib.rs.
Rebase stream's gates on 0870264
fmt: clean.
clippy
-D warnings: clean.build: clean.
workspace tests: pass. tests/sketch_text.rs 10/10, including
text_bits_are_the_same_everywhere.bits: identical.
speed (exact callgrind against main): 43 up, 54 down. Per function, our Rust barely moves:
RawVec<Edge>growth copies);The Body::edges growth is going to bool-speed as a fix on main. Note: valve app's +0.299% is libc, but it is over the round's 0.25% ceiling for user-facing lines, and that is with the master.
Lean (verify/forge-text, verify/winding2d, verify/aeneas/forge-font, forge-sketch): not run there; CI builds it.
Order
After the round-7 stack (#7–#12). Against the stack the only conflict is the
Cargo.tomlexclude list (a union).Generated by Claude Code