Repository navigation
test(service-automation): stub the host lookup in the http-nodes failed-call suite - #38147
Conversation
…ed-call suite The unknown-host and url-secrets cases resolved no-such-host.invalid through the real resolver; on a slow resolver the lookup outlasted the 5000 ms test timeout. The suite now hands the real egress guard a resolver that answers ENOTFOUND for that one host and fails on any other name, so the file makes no DNS query. Refusal text and the nothing-of-the-lookup assertion unchanged. Claude-Session: https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxRDKprCtjpEdtiPFW L1 verdict: ACCEPT (in-area self-review,
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxRDKprCtjpEdtiPFW Queue ejection receipt and one re-enqueue · 2026-11-28T05:35Z · Head-sha
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46112924199 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Elon · project thread
Fixes #38126
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/services/service-automation/src/builtin/http-nodes.test.tsonly (+25 / -3). In the describehttp (canonical node) — a failed call names its host and cause,run()no longer falls back todefaultEgressGuard()(whose resolver is the realdns.promises.lookup). It hands the node the real egress guard,createEgressGuard({ policy: createEnvEgressPolicy({ allowedTargets: '127.0.0.1' }), resolve }), through the existingregisterHttpNodes(..., { egress })seam and the guard's ownresolveoption (documented "DNS override (tests)"; same pattern ashttp-node-egress-guard.test.ts). The stub resolver answers an ENOTFOUND-shaped error forno-such-host.invalidand throws on any other name; it records every name asked.not.toContain('ENOTFOUND')) are unchanged.no-such-host.invalid(unknown host; path/query/userinfo secrets) now also assert the stub answered the lookup (lookupsequals['no-such-host.invalid']).http-nodes.tsand the egress guard are untouched.Every other case in the file was checked for a host lookup:
example.test/api.testcases usestubbedFetchEgress()or the durable outbox (no fetch);example.invalidin the missing-url case never sends. The DNS-off run below records zero lookups for the whole file.Tests
http-nodes.test.ts: 19/19 passed, normally and with DNS disabled.origin/main's version with every name lookup made to hang (the CI shape): the two cases time out at 5000 ms, two lookups ofno-such-host.invalidrecorded.no-such-host.invalidto a public address (93.184.215.14) turns both cases red; restored byte-identical.@objectstack/service-automationtypecheck (incl.check:test-typecheck) green; full vitest 297/297 files, 4342/4342 tests.DNS-off evidence (a preload hook records and then hangs or fails every non-IP lookup)
Ablation (scripts/ablation-replace.mjs, anchor x1 -> x0, restored blob == HEAD blob)
Acceptance notes
skip-changeset: test-only diff.files[]isdist,README.md,CHANGELOG.md; after a build, the new test symbols have zero hits indist/, and the positive control (defaultEgressGuard) has hits.Verification
Read first:
http-nodes.test.tsaround thestubbedLookupEgress()helper (the only risky hunk: the default egress forrun()changed).Two-minute check:
pnpm --filter @objectstack/service-automation exec vitest run --maxWorkers=2 src/builtin/http-nodes.test.tswith networking off; expect 19 passed.Local gates at fc05d4e (derived list, dispatch-gates --ran: 53 derived, 52 run, 1 NOT MEASURED)
check:nul-bytes,check:cross-package-test-inputs,check:test-source-alias,check:type-check-coverage,check:type-check-debt,check:issue-citations).check:dual-build-cjs-loads, exit 3 PREREQUISITE NOT MET (needs a whole-workspacedist/; this diff changes no built output). CI runs it.overlap-check.mjs: VERDICT clean exit 0 (origin/main merges cleanly, 0 overlapping PR heads).check:*, Test Core, Build Core, type-check lanes): CI's.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW