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 — feat(mcpx): declared OpenAPI APIs are first-class servers (#2118) by dezren39 · Pull Request #2514 · developing-today/code Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: dacb8382fb
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Args: append([]string{"api", "serve", s.Name}, files...), | ||
| Mcpx: &config.Extras{Description: s.Description}, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Include API declaration changes in the server's process identity
Once an API child is running, editing its declaration's baseUrl, headers, spec path, or operation filters and reloading leaves the old behavior active. These server arguments contain only the API name and declaration file paths, so config.Resolved.ProcessID() remains unchanged; Registry.Reload consequently retains the existing pool, child, and cached schemas. Include a fingerprint of the effective declaration in the process definition so reload replaces the affected API child instead of continuing to call the previous endpoint or expose removed operations.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the follow-up commit: augmentAPIs now stamps the server env with MCPX_API_DECLARATION_SHA256 — a hash of the APISpec as written (headers carry ${VAR} references, never values) plus the spec bytes when the spec is a local file. PoolID hashes the environment, so editing baseUrl/headers/spec/filters and reloading replaces the API pool instead of retaining the stale child. TestAugmentAPIsAddsServer now asserts the fingerprint is present. (Adapters have the same staleness shape via their files; noted in the code comment as #2118 follow-up material rather than silently expanding this PR.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if len(fs.Args()) > 1 { | ||
| loaded, lerr := loadAPIFiles(fs.Args()[1:]) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Bypass default declarations when explicit serve files are supplied
When the parent uses --config to select valid declarations but the child's discovered config names a missing or invalid paths.apis file, the generated API server cannot start despite receiving valid absolute declaration paths. CmdAPI calls a.loadAPIs() before reaching this override and returns its error immediately, while augmentAPIs does not forward the parent's config selection. Select the explicit serve files before loading declarations so unrelated child defaults cannot prevent the requested API from serving.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the follow-up commit: CmdAPI now selects explicit serve files before any default loading — when sub is serve and file arguments are present, specs come from loadAPIFiles(those files) and loadAPIs() is never called, so a child whose discovered config names a missing/invalid paths.apis file can still serve the API the daemon asked for. The serve case no longer re-loads after the fact.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…y; explicit serve files bypass default declarations (#2118)
The declared-API child gets the declaration fingerprint in its environment (PoolID hashes the env, so a changed declaration replaces the pool). ScriptEnv must name every variable the code writes into a child's environment; TestTheScriptEnvironmentIsWhatTheCodeSets caught the missing entry.
|
Pushed |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.