[Fix] Verify and resolve the Codex issue sweep (#40-#63) - #64
Merged
Conversation
…50) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 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".
… in the ABI snapshot Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR performance and binary-size diff
Baseline: exact PR base Performance
Binary size
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. |
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
session_host_entropyreads the platform CSPRNG (arc4random_buf//dev/urandom/rand_s/ WASIgetentropy) 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 provideswasi_snapshot_preview1.random_getviacrypto.getRandomValues, and a new worker test asserts distinct lineages across 8 lockstep WASM isolates.dump_noderecursion 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
NodeDecodernow decodes over an explicit post-order frame stack.Document.parseand both commit paths handle 8192-deep nesting in tests (4× the old failure threshold).added∪changedby id (newes_session_node_by_id/es_node_parentbridge exports), relinkbubbledfrom the previous snapshot value — instead of re-enumerating every root child through the WASM boundary. Fan-out benchmark added; a one-byte edit in a 10,000-child document went from ~0.49 ms (issue's measurement) to 0.018 ms. The remaining per-commit floor is the pure-JS child-array copy of relinked parents, which is inherent to array-valued immutable snapshots.engines.noderaised to>=24and both READMEs updated.Swift
O(delta)total). Deep-edit benchmark added; a one-byte edit at depth 5000 went from ~49 ms (issue's measurement) to 1.3 ms, scaling linearly.LocalizedError:errorDescriptionreturns the native message; test coversdescription,localizedDescription, andNSErrorbridging.format-swift.sh --checknow runsswift format lint --strict, so a new undocumented public declaration fails CI.Kotlin
ScopeResolvergains aMaterializingstate;detach()(hence commit and close) spins behind an in-flight nativescopes()call, so it can never overlap mutation or free. Deterministic interleaving tests pause the reader inside the window via an internal probe and prove commit/close wait.MarkupVisitor<Unit>overload got its own scope-free traversal and now walks retained snapshots regardless of resolver state (test uses a superseded, never-materialized snapshot; a JVM test asserts the probe never fires).revisionBits(),lineageBits(),rawValueBits(),beforeRevisionBits(),afterRevisionBits()),MarkupID.fromBits,@JvmStatic Document.parse,@JvmOverloadsonParseOptions/MarkupSession. The Maven Java consumer now exercises ids, revisions, sessions, deltas, and footnote queries.-Xjdk-release=17(post-17 API references now fail compilation); the CI consumers job runs the Maven consumer on Temurin 17 while Gradle/AGP stay on 26.commonMain; staged POM/module metadata verified clean; the publication audit now rejects any dependency outsidecom.nouprax+kotlin-stdlib.IllegalStateExceptionnaming both remedies; README documents the Robolectric/local-test setup. (A dedicated downstream Robolectric consumer harness is left as follow-up.)javadocclassifier (spec/README ride along); publication audit now requires index +Document/MarkupSession/MarkupWalkerpages, not mere classifier presence. Dokka's supply chain is pinned in the dependency-verification metadata/keyring.HostTriple(macOS arm64, Linux x64) drives resource paths, native test targets, managed-device ABI, and publish-local; unsupported hosts fail configuration with an actionable message. Packaging verification now parses ELF/Mach-O headers and checks the machine architecture of the desktop payload and all four Android ABIs.verifyJvmAbisnapshot gate (wired intokotlinTest) freezes the Java-visible surface injvm-abi.txt, so accidental growth fails the build. Full class-level hiding is not achievable under Kotlin's compilation model — details on the issue, left open.Release workflow
{deployment-id, tag, version}as a run artifact (uploaded even when the VALIDATED wait fails); resume downloads it from the validated source run and cross-checks tag and version.audit:ci.Not fixed, commented on the issue
brace-expansion@5.0.8is not published to the npm registry yet (latest is 5.0.7), so the requested update cannot be applied. Dev-tooling only; no published artifact carries it.Noted during verification (pre-existing, out of scope)
Scope-table materialization is O(depth²) in every binding:
markdown_core_node_scoperesolves sealed-relative lines by walking the parent chain per node, so the first scope request on a deep document (e.g.Document.parseat 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 verifygreen (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