Skip to content

fix(import): add bounded diagnostics and verified reference guidance - #1010

Draft
franksong2702 wants to merge 1 commit into
yyjeqhc:mainfrom
franksong2702:fix/import-diagnostics-upstream-20261010
Draft

franksong2702 wants to merge 1 commit into
yyjeqhc:mainfrom
franksong2702:fix/import-diagnostics-upstream-20261010

Conversation

@franksong2702

@franksong2702 franksong2702 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

When host-file import fails, an operator using a WARN filter cannot reliably distinguish a trust denial, DNS rejection, download failure, or Runner upload failure. This change adds bounded, correlated diagnostic events and documents how callers verify committed destinations before creating document links.

Diagnostics use fixed stage/failure categories, a bounded HTTP status, and a validated canonical UUID. DNS rejection additionally reports a bounded hostname and address classes. They exclude signed URLs, raw IPs, paths, filenames, attachment contents, caller identities, credentials, and raw error text. Existing trust decisions, all-public DNS admission, address pinning, no-proxy/no-redirect downloads, upload cleanup and replay policy, and input/output schemas are preserved. The patch follows current main's import_host_files and inspect_project_artifact names and does not restore retired adapters.

Validation at upstream base 8c7a1c3fd1cf8baeac40652ca8b252cc89e2c685:

  • The same new HTTP-status and truncated-body diagnostic tests fail against unchanged upstream production code and pass with this patch.
  • Full Server library: 3431 passed, 10 ignored. On macOS, eight ingress tests fail in both baseline and candidate with the default symlinked temporary path; both pass 9/9 using a canonical child-local temporary directory, with the path guard unchanged.
  • Tool contracts with all features: 302 passed; three registration feature variants: 3 passed each.
  • MCP App JavaScript tests: 462 passed; Codex adapter tests: 54 passed, 3 skipped; model gateway mocks: 22 passed; eight CI static contract groups passed.
  • Release static tooling under Python 3.12: 500 passed, 5 skipped, one failure and one error also reproduced on unchanged upstream. The remaining failures require a Linux packaging host and a newer Bash than the system Bash 3.2. Python 3.14 additionally exposes pre-existing JSON pathological-input expectations.
  • Ordinary boundary/privacy review and formatting checks completed. Formal security workflow was unavailable; no claim of a formal scan is made.
  • MCP conformance repository baseline gates passed for both dated profiles (37 and 30 required scenarios covered; expected baseline failure checks remain).
  • Remaining native workspace suites initially reported 3946 passed, 2 Runner timing failures and 130 ignored. Executable test fixtures are rooted at compile-time CARGO_MANIFEST_DIR, so changing TMPDIR did not move fixtures away from recurring macOS Documents placeholders. Rebuilding the identical candidate tree under stable temporary storage passed all 12 lifecycle-related tests. An adjacent isolated control failed at 3.14s with the original Documents binary and passed at 1.11s with the stable binary. Unchanged baseline production and testcase, with only the test helper's fixture root set to the same Documents location, reproduced the 3.14s failure; that helper control was restored. No Runner production/testcase changes are included in the patch.
  • Server binary target: 1 passed. Workspace all-target check passed; the separate production-binary check passed with zero workspace warnings. After recurring offline source placeholders interrupted a Documents-based check, these two checks ran against the identical committed tree in a stable temporary worktree; completed test suites were not rerun.

Direct host-attachment E2E was not run: no fresh host-populated attachment reference was available. Isolated import fixtures cover committed bytes/digests, partial success, overwrite protection, HTTP rejection, truncated-body cleanup, and log redaction.

CI run 38021706329 completed with one Linux workspace-crates failure: webcodex-environment::process::tests::exited_leader_never_leaves_pipe_holding_descendants_or_reader_threads parsed an empty PID marker (ParseIntError { kind: Empty }, tests.rs:67). CI tested merge f19a5acfd31be182ceee00ec1d907b57efc5e79a against base 3c431a6e32a1c8af2e342321817a3c6ea3150a94. The base CI passed this test, and the three process implementation/test blobs are identical between base and tested merge. The exact failure was subsequently reproduced on unchanged baseline module/test sources in an isolated Linux arm64 container under bounded scheduler contention (0.5 CPU, 64 load children, first attempt). This demonstrates a timing-sensitive baseline failure; it does not establish the actual Ubuntu amd64 CI load/cause. No unrelated process changes were added. CI remains red; Server, Runner, macOS, Windows, Docker, tooling, contract and MCP-conformance jobs passed.

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