Skip to content

fix: isolate validation and handle empty initialization state - #2809

Draft
DavidHLP wants to merge 5 commits into
DeusData:mainfrom
DavidHLP:fix/local-validation-boundaries
Draft

DavidHLP wants to merge 5 commits into
DeusData:mainfrom
DavidHLP:fix/local-validation-boundaries

Conversation

@DavidHLP

@DavidHLP DavidHLP commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer decision pending

Findings, reproductions, and validation are tracked in #2814. This draft preserves a candidate patch for inspection. Please decide which issues should be fixed and how accepted work should be split before this PR proceeds; it is not a prerequisite for #2436.

Summary

Redirecting HOME did not isolate the C runner when XDG directories still pointed at the developer's real configuration. Clear those inherited overrides alongside the existing client overrides and extend the fixture contract.

detect_changes also inherited Git's mnemonic prefixes, while its hunk parser expects +++ b/. This made precise hunk seeds fall back to whole-file seeds. Reuse the existing test-impact Git pins and diff flags, and run the walk fixture with mnemonic prefixes enabled.

Skip empty Perl package/declaration sorts and zero-length ObjectScript scanner copies. These existing extraction/pipeline cases previously emitted UBSan diagnostics for null arguments.

The strict full run also exposed an empty initial signature-buffer copy and a search of an empty RST configuration table. Guard both. The signature-buffer safeguard already exists in #2436; this applies the same protection to main. Extend the existing Perl documentation case with POD containing no function declarations.

Dispatch Python help probes directly to Python in the venue-parity contract. Previously it invoked Bash first, which could run ImageMagick's import command and wait for graphical input on a desktop host.

The pre-fix implementations are from main at 8530c8cd. These issues were found while investigating local failures around #2436 and are kept separate from its Swift changes.

On glibc 2.44, the production binary also crashed before main when libc called free(NULL) before mimalloc initialization. Backport the small upstream microsoft/mimalloc fix for issue #1341. Add an ELF pre-initialization regression and missing mimalloc object dependencies. Refresh the three reviewed vendored-source checksums.

Validation

  • Before the fixes, the same fix(swift): preserve declaration identity and compatible call edges #2436 binary failed 22 CLI tests and multiple MCP assertions in the inherited environment. Clearing XDG overrides and the global Git config produced 749 passing tests and 5 platform skips.
  • A focused run with diff.mnemonicPrefix=true reproduced the hunk-seed failure and the assertion-exit leak reports.
  • tests/test_smoke_fixture_contract.sh: passed.
  • tests/test_venue_parity_contract.sh: passed after the interpreter correction.
  • Extraction, MCP, pipeline, CLI, and known-class suites: 1,690 passed, 5 platform skips, no UBSan reports or failed assertions. The log no longer references the developer's real Zed configuration path.
  • scripts/lint.sh --ci with CI's cppcheck 2.20.0 and clang-format 20: passed on the final code.
  • Diff-scoped clang-tidy and git diff --check: passed.
  • New allocator regression: fails before the patch and passes afterward. Production startup and all enabled production watchdog, worker, watcher, TLS, security-string, and destructive-ordering guards passed.
  • Vendored integrity check: 1,083 files passed after refreshing the checksums.
  • Final clean canonical scripts/test.sh entry with UBSAN_OPTIONS=halt_on_error=1 reached All tests passed, including production guards. Its unit phase reported 9,802 passed, 0 failed, 10 platform skips. The incremental suite initially skipped setup after a transient TLS fixture-clone failure; its separate rerun with the same binary passed all 164 tests without sanitizer diagnostics. Together, the final binary passed 9,966 tests.

Signed-off-by: DavidHLP <lysf15520112973@163.com>
@github-actions

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Backport microsoft/mimalloc@b2226c1 for issue DeusData#1341. Seed both page-map layouts before constructors run and preserve the empty map on initialization failure. Add a release-mode ELF preinitializer regression and track included allocator sources in test and TSan object dependencies.

Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
@DavidHLP DavidHLP changed the title fix: isolate test paths and guard empty extraction data fix: isolate validation and handle empty initialization state Oct 26, 2026
@DavidHLP
DavidHLP marked this pull request as ready for review October 26, 2026 16:59
@DavidHLP
DavidHLP requested a review from DeusData as a code owner October 26, 2026 16:59
@DavidHLP
DavidHLP marked this pull request as draft October 27, 2026 00:44

This branch has not been deployed

No deployments
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.

1 participant