GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — reload-credentials-redesign by jeffreyaven · Pull Request #761 · stackql/stackql Conversation
Member
SummaryRedesigns the The bugFound on a fresh stdio session (0.11.669, Windows, aws provider installed, valid creds in the process env):
Root cause: the report read the auth context registry, which is populated lazily on a provider's first query. The env re-source ran before the failing lookup, so the shipped behaviour was a silently working reload with a misleading failure report. reload_credentials designThe handler is now three ordered phases, and the report is a pure function of post-reload state.
Each row gains a Invariants: an installed provider always produces a row; the report is identical before and after a provider's first query; a second reload against an unchanged file is idempotent ( Finding that changed the designThe work order assumed "lazy registration rebuilds on next query". It does not: doc-default auth registers only when the provider object is first created ( Query tool errorsCredential resolution failures on The provider is parsed from the statement ( Tool descriptions mastered as markdownTool descriptions were inline Go strings across The descriptions were then reworded for turn economy: Design notes to debate once
Test planRobot (
Removed: Go unit tests: Local run: full Mcp robot suite 64/69 with the 4 known version-stamp environmental failures on an unstamped binary, plus the retargeted pull scenario passing separately. Docs
Out of scope
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ontexts, changed flag, actionable credential errors The reload_credentials MCP tool read the lazily populated auth context registry, so an unscoped call before any query returned no rows and a scoped call for an installed, credentialed provider errored with "cannot find AUTH context" (after the env re-source had already run). The handler is now three ordered phases: re-source the configured env file (a configured file that has gone missing is an explicit error naming the path), invalidate auth contexts registered lazily from provider documents (--auth contexts are retained; the cached provider object is dropped with its context because doc auth only registers on provider creation), then report every installed provider against the now-current environment. Scoping is a filter; an unknown provider name is the only scoped error. Each row carries a new `changed` field: a sha256 comparison of the resolved credential material (successor chain included) before and after the re-source, never emitted. Query tools: credential resolution failures on run_select_query, run_mutation_query and run_lifecycle_operation now name the provider (parsed from the statement) and the recovery sequence (fix the env file, call reload_credentials, retry). execQuery propagates statement errors, which mutation, lifecycle and pull_provider previously swallowed into an empty success payload. Tool description rewritten to forbid preemptive calls and to make `changed: false` after a failure the stop signal. Tests: scripted stdio harness (run_stdio_credential_script) driving the stackql_auth_testing dummy-credential provider; robot scenarios for fresh-session scoped/unscoped/unknown, rotation after a registered context (stale key rejected by the mock, new key used post-reload), rotation before first query, recovery from failed resolution (select and mutation error text, no-op reload), missing env file. The pull_provider scenario now runs against a mocked HTTP registry server (9927) so the install is real rather than a swallowed local-mode error. Co-Authored-By: Claude Fable 5.1 <[email protected]> Tool descriptions were inline Go string literals spread across server.go and query_library.go while instructions, prompts and resources were already authored as markdown under pkg/mcp_server/content. Move the 16 descriptions to content/tools/<tool_name>.md (frontmatter `name`, body is the description prose; soft line breaks collapse to spaces, blank lines keep paragraph breaks) and load them through the same embedded content framework. addToolWithGate attaches the mastered description and returns an error when a registered tool has none, so registration failures surface at server construction like prompt and resource failures do. Published bytes are unchanged for every tool. The build-time gate test now checks coverage in both directions: every published tool has a file and every file names a published tool. Co-Authored-By: Claude Fable 5.1 <[email protected]> …lishes Reads content/tools/run_select_query.md from disk independently of the loader, strips the frontmatter and joins the wrapped lines, then compares with the description returned by an in-process tools/list. Co-Authored-By: Claude Fable 5.1 <[email protected]> …TP server The 2026-07-28 stateless roundtrip now opens with server/discover, the SEP-2575 replacement for the initialize handshake, and the 9926 scenario asserts the response lists the revision and carries the embedded content/instructions text. Closes the black-box gap where the new-revision instructions path was only covered by the in-process unit test. Co-Authored-By: Claude Fable 5.1 <[email protected]> server_info and reload_credentials are on-demand recovery and diagnostic tools, never session-start steps; the instructions said otherwise. Session guidance now states the defaults (sqlite3, safe), that credentials resolve at query time with no preceding step, and the fail -> fix file -> reload -> retry sequence with changed: false as the stop signal. The 401 recovery rule gates the retry on changed: true. Discovery points at the query library before the drill-down, dialect rules describe validate_select_query as an on-demand pre-flight rather than a routine step, and the mutation shapes gain the EXEC statement form behind run_lifecycle_operation. validate_select_query: the "no credentials required" claim was checked against the binary and is false (EXPLAIN resolves credentials and fails before reporting a bad column when they are missing); the description now says so. Trailing newlines restored on the tool files. The stateless discover scenario anchors on the "# Discovery workflow" heading rather than a sentence that the rewrite reworded. Co-Authored-By: Claude Fable 5.1 <[email protected]> Uh oh!
There was an error while loading. Please reload this page. … scripted driver The Sources Env File Mid Session scenario now runs through run_stdio_credential_script like the other reload scenarios, and the superseded run_stdio_credential_reload_roundtrip helper is removed. This also clears the CodeQL clear-text-storage alert (pre-existing on main) that the helper's secret_value write carried. Co-Authored-By: Claude Fable 5.1 <[email protected]> Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |