Resolve user-stub star re-exports through the active typeshed; fix lost preview-discard intent; path-restrict the Dependabot sweep#350
Merged
Conversation
…update Bumps the npm_and_yarn group with 1 update in the /vscode-extension directory: [linkify-it](https://github.com/markdown-it/linkify-it). Bumps the npm_and_yarn group with 1 update in the /website directory: [linkify-it](https://github.com/markdown-it/linkify-it). Updates `linkify-it` from 5.0.1 to 5.0.2 - [Changelog](https://github.com/markdown-it/linkify-it/blob/master/CHANGELOG.md) - [Commits](markdown-it/linkify-it@5.0.1...5.0.2) Updates `linkify-it` from 5.0.1 to 5.0.2 - [Changelog](https://github.com/markdown-it/linkify-it/blob/master/CHANGELOG.md) - [Commits](markdown-it/linkify-it@5.0.1...5.0.2) --- updated-dependencies: - dependency-name: linkify-it dependency-version: 5.0.2 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: linkify-it dependency-version: 5.0.2 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
A user stub re-exporting from a stdlib stub (MicroPython's uio.pyi is just `from io import *`, with io in the custom typeshed's stdlib/ tree) produced false imports_module_attribute errors: the re-export walk only searched the stub's own source root, so the star target silently resolved to nothing (GitHub #312 follow-up). - basilisk-stubs: add reexported_member_names_with_fallback — star targets resolve in the stub's own root first, then through a caller-supplied fallback; a sibling stub always shadows a same-named fallback module. - basilisk-checker: hoist the snapshot read+parse inline in load_snapshot_stub_module into a shared parse_snapshot_stub, and make build_stub_api fall back to the active step-3 typeshed snapshot. - Tests: flat-module star (uio→io), stdlib-package recursion (uasyncio→asyncio→.tasks), stdlib __all__ authority, redundant-alias form, sibling-stub precedence, and a CLI e2e mirroring the reporter's exact pyproject (stub-paths and typeshed-path both at typings/). - Spec [STUBRES-PYI-REEXPORTS]: document local-first + snapshot-fallback. Verified against the reporter's real micropython stub corpus: 24 files, 0 diagnostics — parity with pyright/mypy.
…9dce415db' of github.com:Nimblesite/Basilisk into bug-fixes-101
A full-branch merge of a security bump (based on current main) into a drifted staging branch dragged main's workflow-file edits along, and the Actions token can never push .github/workflows/* changes (no workflows scope, not grantable). PR #340's sweep failed exactly this way and the PR was left sitting on main. The sweep now copies only the PR's own changed paths (merge-base diff) onto the live staging tip, so main's drift never rides along. Bumps that themselves edit workflow files are left open with a comment for human review instead of failing.
…log's queued close event The configuration editor told the host a preview was discarded only from the <dialog> 'close' event listener. Chromium dispatches that event on a queued element task, and an occluded webview's throttled task queue may never run it — the dialog's open flag flips but the discard intent is silently lost, leaving the host holding a pending preview forever. The full VSIX suite reproduced this on macOS: the dismissed-rule-preview DOM test failed whenever earlier suites left the panel occluded. Every user-initiated discard (Cancel button, Escape) now posts cancelPreview synchronously through discardPreview(); the close-event listener stays as a guarded fallback for any other close, re-armed on each preview state so a fresh preview can always report its own discard. The DOM test drives the Cancel button exactly as a user would instead of calling dialog.close() programmatically, and .vscode-test.mjs accepts BSK_TEST_GREP to run a single webview test in isolation.
CI's Lint job runs stable cargo fmt --check; the new re-export tests were formatted under nightly rustfmt, whose layout for these two call expressions differs. Whitespace-only.
cargo-mutants runs with --copy-target true, so each parallel job holds a full copy of the debug target; on the standard runner's ~14 GB root disk the shards exhausted space mid-run. The linker died with 'No space left on device' or SIGBUS, and cargo-mutants recorded those aborted builds as UNVIABLE — deflating caught (137 -> 121 -> 111 across two runs) and failing the ratchet gate on mutants that were never actually tested. Purge the ~25 GB of preinstalled toolchains the job never touches, the same reclaim the coverage job already does.
# Conflicts: # .github/workflows/ci.yml
abdushakoor12
enabled auto-merge (squash)
July 24, 2026 17:16
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.
TLDR
Fixes false
imports_module_attributeerrors when a user stub star-re-exports from a module owned by the active Typeshed source (the MicroPythonuio.pyi→from io import *case, GitHub #312 follow-up), fixes a lost-cancelPreviewrace in the configuration editor's impact dialog, and makes the Dependabot sweep path-restricted so security-bump sweeps can no longer fail on workflow-file pushes (the failure that stranded #340).What Was Added?
parse_snapshot_stub(crates/basilisk-checker/src/exports.rs): the single producer of a snapshot-backedStubModule, extracted from the cross-module loader closure so the re-export fallback gets the same target-filtered parse.reexported_member_names_with_fallback(crates/basilisk-stubs/src/reexports.rs): likereexported_member_names, but consults a fallback loader for star targets that don't resolve inside the stub's own source root. Local resolution always wins; the fallback never overrides a sibling stub.discardPreview()in the configuration editor webview runtime: every user-initiated dialog dismissal (Cancel button, Escape) postscancelPreviewsynchronously with the action..github/workflows/*is left open with an explanatory comment (the Actions token cannot push workflow files by construction) instead of failing the job..vscode-test.mjshonoursBSK_TEST_GREPso one webview test can be run in isolation.import_apply_tests.rsand one end-to-end CLI test (see below).linkify-it5.0.1 → 5.0.2 (transitive dev dependency of@vscode/vsce) in the vscode-extension and website lockfiles.What Was Changed or Deleted?
build_stub_api(crates/basilisk-checker/src/imports/apply.rs) now takes the import search paths and falls back to the active step-3 Typeshed snapshot when a user stub's star target doesn't resolve beside the stub — souio.pyicontaining onlyfrom io import *picks upio's members from the custom typeshed'sstdlib/tree instead of producing "Moduleuiohas no attributeStringIO" on every re-exported name.<dialog>closeevent, which Chromium dispatches on a queued element task — an occluded webview's throttled task queue can drop it, silently losing the discard and leaving the host holding a pending preview. The Cancel/Escape paths now post synchronously; thecloselistener remains as a guarded, double-post-proof fallback re-armed per preview state..github/workflows/dependabot-automerge.yml: the sweep no longergit merges the whole bump branch intodependabot-upgrades. It copies exactly the PR's own changed paths (merge-base diff, deletions included) onto the live staging tip. A full merge of a security bump (based on currentmain) into a drifted staging branch dragged main's workflow-file edits along, and the push was rejected — theworkflowsscope cannot be granted toGITHUB_TOKEN. Path-copying makes the sweep immune to staging-branch drift while keeping clobber semantics (latest bump of a file wins) and the retry-on-race loop.make_custom_typeshedtest helper now emits oneVERSIONSline per top-level module, so package stubs (asyncio/__init__.pyi+asyncio/tasks.pyi) can be modelled.How Do The Automated Tests Prove It Works?
user_stub_star_reexport_from_stdlib_stub_is_captured— mirrors micropython-esp32-stubs'uio.pyiverbatim; assertsStringIO/BytesIOland in the captured member API via the snapshot fallback.user_stub_star_reexport_follows_stdlib_package_reexports— the chaineduasyncio.pyi→from asyncio import *case; proves the walk keeps resolving the stdlib package's own relative re-exports (from .tasks import *) inside the snapshot.user_stub_star_reexport_honours_stdlib_dunder_all— a stdlib stub's__all__stays authoritative across the boundary (BytesIOexcluded when absent from__all__).user_stub_alias_reexport_from_stdlib_stub_is_captured— thefrom io import StringIO as StringIOredundant-alias convention crosses the boundary too.user_stub_star_reexport_prefers_sibling_stub_over_snapshot— guard: a siblingmachine.pyiin the same stub dir shadows a same-named snapshot module; the snapshot is a fallback, never an override.cli_accepts_user_stub_reexports_from_the_custom_typeshed_stdlib(e2e, real CLI) — the reporter's exact configuration (stub-pathsandtypeshed-pathboth attypings/) checksuio.StringIO()/uio.BytesIO()with exit code 0 and noimports_module_attribute.closeevent never fired (instrumentation showeddialog.openflipping with zerocloseevents delivered and nocancelPreviewintent reaching the host). The driver now dismisses through the Cancel button exactly as a user would and the test passes deterministically — 793ms vs 5–6s before, since nothing waits on the throttled task queue.Spec / Doc Changes
docs/specs/CHECKER-STUB-RESOLUTION-SPEC.md([STUBRES-PYI-REEXPORTS]): documents local-first star-target resolution with fallback to the active step-3 Typeshed source, recursive resolution within whichever source resolved each target, and sibling-shadowing semantics. The dependabot-automerge workflow's header comments were rewritten to describe the path-restricted sweep and the workflow-file constraint.Breaking Changes