Repository navigation
feat(gateway): select GitHub destinations through configured DNS - #180
Closed
freeqaz-openai wants to merge 11 commits into
Closed
freeqaz-openai wants to merge 11 commits into
freeqaz-openai wants to merge 11 commits into
Conversation
freeqaz-openai
commented
Sep 15, 2026
freeqaz-openai
commented
Sep 15, 2026
| const signal = nativeAny.call(NativeAbortSignal, [value as AbortSignal]); | ||
| // A private native dependent isolates addAbortListener's mutable method calls. | ||
| // Native dependency propagation also bypasses source abort-event suppression. | ||
| Object.defineProperties(signal, { |
Collaborator
Author
There was a problem hiding this comment.
Is this the best way to do this? fine if so, but worth considering alternatives.
freeqaz-openai
commented
Sep 15, 2026
| @@ -0,0 +1,310 @@ | |||
| import assert from "node:assert/strict"; | |||
Collaborator
Author
There was a problem hiding this comment.
nit: can the tests be refactored to move closer to a standardized DSL where tests are short + call into a test harness. Easier to read, maintain, and add new test cases with less copy paste.
freeqaz-openai
commented
Sep 15, 2026
| @@ -0,0 +1,604 @@ | |||
| import assert from "node:assert/strict"; | |||
Collaborator
Author
There was a problem hiding this comment.
same nit here: can we deslop into code that moves towards a declarative DSL?
freeqaz-openai
commented
Sep 15, 2026
| ); | ||
| } | ||
|
|
||
| function selectDestination( |
Collaborator
Author
There was a problem hiding this comment.
let's clean up this function too. too many let statements, internal functions with closures that make mocks/testing hard, and too hard to follow.
freeqaz-openai
marked this pull request as ready for review
September 15, 2026 18:11
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.
Summary
Select a numeric port-443 destination for
github.comorapi.github.comthrough explicitly configured DNS servers. A fresh native resolver evaluates complete A and AAAA answer sets; unsafe or malformed answers reject the entire selection. OnlyENODATAis treated as an empty family.The selection owner retains configuration and bounds, checks abort/deadline state, and releases its resolver, timer and subscription on every terminal path. It returns a frozen destination only after cleanup and final bounds checks. There is no OS lookup fallback, global DNS mutation, application cache or alternate-address retry.
Earlier supplier refresh and validation
The previous head
e983c1a871756a8e574a28280e715144b3f5dcfdreceived #177 ata6e8c6206ed541c59b070d523d2f33c8dc333dca, including main's Agent stop and Go CLI changes. HTTP/JSON/DNS source and compiler fixtures are unchanged; the complete migration tree matches the accepted supplier. Required TypeScript checks retain coverage of every destination-transport source module alongside the Go CLI checks.These compiler and generated-API checks resolve the local dependency gaps recorded at
34ffb57688ad06957cbeb21a198950fe2d799c00; its 197 component cases also passed again for this refresh. PostgreSQL migrations were not executed locally. These are retained results for that earlier revision; the focused correction is recorded below.Dependency and scope
Based on #177. The DNS tests use real loopback UDP without dialing returned destinations. Socket address pinning, original Host/SNI, public TLS trust, current authority and the actual gateway service remain separate integration work. A numeric destination grants no request authority. These checks do not qualify live upstream dialing or a deployed gateway.
Current correction
At
1b7a78400a25ae91c21e27c708816a1ef9d693a1, the native DNS cases now contain distinct permitted A/AAAA answers, proving first-A selection and first-AAAA fallback. Destination and native DNS suites passed 186 tests, no failures or skips; changing selection to the last address failed both strengthened cases. Runtime selection is unchanged. This is focused component evidence; provider-rule/bootstrap composition, socket/TLS integration, ordinary Agent use and live-provider qualification remain pending. Hosted CI for this candidate remains a separate check.