Repository navigation
Complete async query-job waiting and result handoff - #4
Merged
Merged
Conversation
Refs #5. Preserve the six-tool contract and synchronous startup on storage errors. Windows handle backend follows separately.
This was referenced Oct 24, 2026
Broccolito
marked this pull request as ready for review
October 24, 2026 08:22
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.
Durable job storage now enforces owner-private permissions in the backend while preserving the six job tools, normal submission/wait/cancellation and completed local output. Existing safe owned stores are repaired without deleting results. New output is private before bytes are written. Storage failures retain actionable codes/guidance while synchronous startup and all six job-tool registrations remain available.
Fixes #5. The original async-job contract and original-head native-app evidence below retain their original scope.
On Windows, retained no-reparse handles verify ownership and link counts. Protected DACLs grant only TokenUser. The process default-owner exception applies only to the exact current token owner when it is SYSTEM or Builtin Administrators; arbitrary ordinary group owners are refused because their members may have implicit permission-change rights.
Before changing any existing Windows ACL, every managed directory is inspected. A mutation allow ACE for an ordinary foreign account, an unknown ACE form or an unsafe mask refuses automatic migration with
private_storage_requires_quiescent_repair. The user is advised to stop writers and have the owner/administrator remove foreign write/delete/change-permission rights throughout the tree, or select a fresh private root while retaining the old data. This prevents inheritable ACL repair from touching an entry a foreign writer could insert after enumeration. Known private stores and elevated SQLite journals keep working; no routine approval dialog is added. macOS/Linux inherited ACL cleanup and descriptor-relative checks are preserved.Latest local validation on source
3afb2d24b364201b8fd4f279063a03886e01532f; shipping headf9a6e40f0e9c92a47fec4b56214474b847c214fe:e83066ee4381d3f471005b65d676cf646a3fb84bf43c72b7bd8f7984778a148f. BRXT built twice identically: 138578 bytes, SHA-2560eab7151e1005693205dcd76bded202a52dbeca33787e4c3ba99d3c790ad22cf. A separate build from committed source matches the BRXT;git diff --checkpasses.f9a6e40f0e9c92a47fec4b56214474b847c214fepassed ten hosted Windows controls, zero skips, including the migration/default-owner regressions, in Windows private storage. All six Linux/macOS/Windows jobs across push and PR workflows are SUCCESS on this head. The two injected-helper controls test owner/unknown-ACE refusal; the remaining controls use actual Windows filesystem/ACL operations. This is not a second-account execution claim.Scope limits: administrators/root, arbitrary same-user processes and foreign handles opened before permission tightening are outside the confidentiality claim. SQLite open and final result rename retain pathname seams after checks; use owner-controlled local storage. Windows chunked result reading retains its existing explicit unsupported-platform response; completed local worker files remain available. Native BioRouter and live database acceptance have not been rerun on these storage heads.
Query jobs currently require immediate status polling and return a local result path that a jailed host cannot read. A successful status lookup also hides a failed operation from the host's failure tracking. This adds native waiting, capacity discovery and bounded result reading by job ID, with an explicit operation outcome independent of lookup success.
The six job tools preserve atomic two-job admission and explicit resubmission. Failed jobs retain sanitized error codes, original phase and retryability, including FreeTDS timeout code 20003. Waits keep the MCP event loop responsive during SQLite contention and cancellation. A wait deadline returns an explicitly stale last observed active state when available; an unreadable initial state returns a transient lookup error without inventing an operation outcome. The POSIX result reader uses managed descriptor-relative opens, rejects links/nonregular files and unexpected result sizes, and fails closed on unsupported platforms. Updated instructions and a credential-free stdio fixture exercise real FastMCP tools without a database connection.
Fixes #3. Related host consumer: BaranziniLab/biorouter#438.
Follow-up
747f5ed2db0a0fd2fb0bf8a1d4b561f75b5a238epreserves the existing six-tool interface, 30-second contention-aware native wait, managed result reader and namespaced operation IDs. Capacity snapshots now explicitly includeadvisory: true. CLI watch uses native waiting. A failed worker launch or broken stdin pipe returns its allocated durable ID with failed operation metadata and releases its capacity slot; cleanup failures cannot hide that outcome. Failure guidance follows the structured cause rather than blindly rewriting SQL.Earlier async-contract follow-up validation (before owner-private storage changes): 57 credential-free tests run, one existing Neo4j-only skip, no failures; wheel build passed; canonical BRXT rebuilt twice identically (129693 bytes, SHA-256
e89f2dfff8db05f60dfa00a7757591a9ea992df6ebfa28a0802c4e76886ca53d); committed-source BRXT comparison andgit diff --checkpassed. Seven new regressions cover advisory snapshots, native CLI waiting, worker-start/pipe/reaper failures and actual MCP metadata. No live database queries or production credentials were used. Native BioRouter acceptance has not been repeated on this follow-up head; the original-head app evidence below retains its original scope.Refs BaranziniLab/biorouter#436; leave that host issue open until both connectors and host verification are complete.
Original-head validation recorded for
ddc3d70:uv build --wheelproduceducsfomopagent-0.3.2-py3-none-any.whl.c5170231bd985f64ab39b77c19908e028685c7374b7291f21e28f3b467abd1a9.git diff --checkpassed.The original PR author reported the following native validation on
ddc3d70through the actual development Electron app and Rust daemon, using this repository's credential-free stdio fixture and real JobStore, worker and FastMCP tools with a deterministic synthetic provider:isError: false) while the host showed failed-operation badges and counted one distinct failed operation; observed badges survived session reload.caught: false), while a third submission at full two-job capacity returnedcapacity_exceededwithisError: true.5ef7a0f5e2475c79a84cca0500abb12a4e25fc9bba48a763600a5d5628fed649; reconstructed bytes matched the managed artifact.cancelledand released both capacity slots. Nested cancellation also completed without an exception.These app checks exercise synthetic jobs, not live database connectivity, production database execution or model reasoning. GitHub CI passed on the original
ddc3d70head: all four Linux/macOS check runs across push and pull-request workflows completed successfully, including Python tests, wheel build and deterministic BRXT checks.