Repository navigation
feat: add GitHub transport and Source Control settings - #647
Merged
Merged
Conversation
Tryanks
marked this pull request as ready for review
October 8, 2026 09:42
This was referenced Oct 8, 2026
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
Closes #638.
Adds host-bound credentials, SHA-256 fingerprints and cached verified identity; 30-second whole-response result deadlines, bounded 8 MiB responses, ordered error classification, conditional reads, and cancellation-safe permits. Quota comes exclusively from server headers. Source Control shows host enablement, multiple gh accounts, write-only token controls and the active credential source in both locales. Release assessment behavior remains unchanged and runs independently of Source Control enablement. The wire note is added without a protocol bump.
Provider secrets and GitHub tokens share the existing single writer, with separate namespaces in a versioned secrets envelope. Literal legacy profile IDs, including
github, remain readable and migrate on the next write. Secret commands retain reconnect delivery keys in memory but never enter the persisted outbox.sha2is a new direct services dependency, already present in the workspace lockfile. Genuine SHA-256 fingerprints/document hashes justify this edge; implementing cryptography locally would be less reliable. No additional HTTP or test dependency was added.Evidence
After: release checks and authenticated calls share the transport; ten real-client HTTP/process fixture tests cover mapping, precedence, errors, reserve/interactive admission, free 304s, 401 refresh, generation ordering, pinned identity, body/deadline bounds, dropped waiters and GraphQL paging. Runtime and client tests independently cover the real settings writer and reconnect/persistence boundary.
request.key.is_some()with the initial unkeyed secret policy; the storage regression lost the legacy provider namedgithubwith a flat reserved namespace.After: both pass with keyed in-memory secret delivery and unambiguous versioned storage, including independent updates and fail-closed unsupported files.
Checks on final commit
722f6ad1:Focused final validation: 14 passed, 284 skipped. GitHub stress validation: ten iterations of ten tests, all 100 executions passed without LEAK warnings. Desktop and phone example builds passed. Mobile/Web and other desktop OS builds remain for CI; no live enterprise host was available. Existing dependency
block v0.1.6emits a future-incompatibility notice.Live:
gh auth token --hostname github.comexited 0 with stdout discarded.cargo run -p tcode-services --example github_identity --lockedreturnedGET /user succeeded: login=Tryanks, id=49746336, source=Gh. No token was printed or committed.Screenshots use fresh
mktempprofiles, English, synthetic projects/accounts/hosts and no live profile data. Captured from the shared desktop shell and phone example with--local:Test audit: declarations 1,018 → 1,030; no existing tests deleted or rewritten. Rust production lines +1,922/−59; test lines +1,489/−0; test-support lines 0. An independent review found no remaining findings. Existing version assessment tests remain intact.
Failed/new tests were settled under CONTRIBUTING as follows:
secrets_keep_reconnect_delivery_keys_without_entering_the_persisted_outboxandgithub_secret_command_persists_separately_and_settings_never_replicate_it: step 3, demonstrated pre-fix failures repaired at the client/storage owners.secret_commands_cross_the_live_wire_without_entering_the_persisted_outbox: step 1, submissions now exercise an attached transport; its authored case was subsequently strengthened and renamed to the keyed reconnect test above, preserving offline refusal and legacy-outbox purge.whole_response_result_deadline_includes_a_stalled_dns_resolver: step 1, the HTTP fixture now accepts EOF from a timed-out connection and keeps serving the next request, as the real server would.maps_hosts_and_keeps_saved_environment_and_enterprise_credentials_in_their_boundaries,aliases_and_pager_send_values_as_variables_and_report_unread_tail,latest_arrival_can_restore_quota_but_an_older_success_cannot_clear_a_new_refusal, andpinned_verified_identity_is_cached_per_fingerprint_and_refuses_another_host: dependency investigation steps 1–4, macOS Nextest 0.9.133 capture-pipe inheritance race. Read the dependency source and upstream fix, then repeated unchanged tests using checksum-verified official Nextest 0.9.146 in/tmp; no assertions, leak timeout or repository runner configuration were relaxed.Upstream takes precedence where issue wording differs:
githubQuota.ts:85–92admits background requests at the 10% floor, andGitHubApi.ts:329–335returns NOT_FOUND only when all GraphQL errors are NOT_FOUND. Both behaviors are preserved and exercised.Merge Danger
Door: one-way
The next secret write upgrades the flat provider map to a versioned envelope. Binary-only rollback to an older build cannot read that envelope; rollback requires restoring the old file or flattening its
profilessection. Legacy entries are preserved during migration, including names that collide with envelope keys.Blast Radius: credentials
Changes shared secret storage and secret command persistence as well as GitHub requests and version checks. Raw REST responses explicitly flag truncation; JSON and GraphQL success reject truncated bodies. A timed-out DNS/TLS job can remain blocked in the OS, but keeps its permit until it exits, so outstanding I/O stays bounded to eight jobs.