Skip to content

[Fix] Verify and resolve the Codex issue sweep (#40-#63) - #64

Merged
DongyuZhao merged 12 commits into
mainfrom
issue-sweep-codex
Jul 28, 2026
Merged

[Fix] Verify and resolve the Codex issue sweep (#40-#63)#64
DongyuZhao merged 12 commits into
mainfrom
issue-sweep-codex

Conversation

@DongyuZhao

Copy link
Copy Markdown
Contributor

One sweep over the 24 Codex-filed issues (#40#63). Every issue was re-verified against the current code before any fix; all 24 are factually accurate — no false positives. This PR fixes 22 of them; the remaining two (#55, #62) are commented on their threads with what blocks a complete fix.

Engine (C)

  • [P1][Identity] Generate collision-resistant session lineages across isolated runtimes #40 — lineage entropy: session_host_entropy reads the platform CSPRNG (arc4random_buf / /dev/urandom / rand_s / WASI getentropy) into the lineage seed; the address/time/clock mix stays as fallback. Regression test: 64 sequential same-address sessions never collide. The ES shim now provides wasi_snapshot_preview1.random_get via crypto.getRandomValues, and a new worker test asserts distinct lineages across 8 lockstep WASM isolates.
  • [P2][C] Make canonical document dumping iterative for deep ASTs #45 — iterative canonical dump: dump_node recursion replaced by an explicit frame stack with identical byte output (conformance fixtures unchanged). The issue's repro (2048-deep quotes, 256 KiB stack) now exits 0 — as does 50,000-deep. The pathological suite's session case lost its shallow-depth exception and runs at 50,000 like the one-shot cases.

ES

Swift

Kotlin

Release workflow

Not fixed, commented on the issue

Noted during verification (pre-existing, out of scope)

Scope-table materialization is O(depth²) in every binding: markdown_core_node_scope resolves sealed-relative lines by walking the parent chain per node, so the first scope request on a deep document (e.g. Document.parse at 4096-deep quotes ≈ 113 ms in ES) dominates deep-document cost. The fix (an accumulator-based scope walk like the dump's) touches the C API and all three bindings — worth its own issue.

Verification

pnpm verify green (format, lint, contracts, gradle model, release version, repository/CI/test/surface/package audits); C correctness + conformance suites; ES node tests (18) + conformance (15) + packed-artifact consumer; Swift tests (17) + conformance + strict lint; Kotlin JVM/Android-host/macosArm64 tests + all three conformance suites + full consumer matrix (KMP, jvm-gradle, Android, Maven-on-JDK-17) + packaging/ABI gates.

Closes #40. Closes #41. Closes #42. Closes #43. Closes #44. Closes #45. Closes #46. Closes #47. Closes #48. Closes #49. Closes #50. Closes #51. Closes #52. Closes #53. Closes #54. Closes #56. Closes #57. Closes #58. Closes #59. Closes #60. Closes #61. Closes #63.

🤖 Generated with Claude Code

DongyuZhao and others added 9 commits July 27, 2026 23:53
… docs (#40 #44 #45 #48 #61 #63)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…#46 #49 #52)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ee visitor (#41 #47 #51)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…50)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ncurrency by tag (#42 #43)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…oroutines, Android host loader (#56 #57 #58 #60)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… gate (#54 #55 #59)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2dfcd8b5e7

ℹ️ 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".

Comment thread packages/markdown-core/tests/runners/pathological_runner.c Outdated
Comment thread packages/kotlin-markdown-core/build.gradle.kts Outdated
… in the ABI snapshot

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR performance and binary-size diff

Benchmark execution is required; hosted-runner timing, memory, and size deltas are informational only.

Baseline: exact PR base 384e8a744487 (successful main CI).

Performance

Runtime Workload Median Perf diff Memory Memory diff
c representative_large 7.155 ms ⚠️ +37.1% 8,636 KiB ✅ -0.2%
es deep_nesting 0.269 ms ✅ -7.2% 148,392 KiB ✅ -0.9%
es large_document 27.919 ms ✅ -16.2% 148,008 KiB ✅ -1.2%
kotlin deep_nesting 0.276 ms ⚠️ +12.7% 108,368 KiB ✅ +4.8%
kotlin large_document 22.852 ms ✅ -31.1% 107,960 KiB ⚠️ +5.9%
swift deep_nesting 0.072 ms ✅ -10.6% 26,192 KiB ✅ +0.7%
swift large_document 18.284 ms ✅ -17.2% 26,128 KiB ✅ +0.6%

Binary size

Artifact Bytes KiB Size diff
c-shared-library 501,952 490.2 ✅ +64 B (+0.0%)
es-wasm 288,818 282.0 ✅ +245 B (+0.1%)
kotlin-jvm-jar 318,255 310.8 ✅ +5,283 B (+1.7%)

Head CI run

Size deltas are deterministic for identical build inputs. Performance deltas compare separate hosted runners and should be treated as directional evidence, not a pass/fail threshold.

DongyuZhao and others added 2 commits July 28, 2026 01:36
…gate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Swift: deep value trees deallocate through recursive ARC releases, so the
depth test owns them on a 16 MiB-stack thread and proves the iterative
walk/dump on an explicit 512 KiB stack. Kotlin: dump bytes are quadratic
in depth and exceed the Android instrumentation heap at 4096, so
full-depth checks are structural and dump equality is pinned at 512.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DongyuZhao
DongyuZhao merged commit 938bba6 into main Jul 28, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment