Conversation
There was a problem hiding this comment.
Pull request overview
Promotes the 0.1.4 release state from dev to main, including gateway setup hardening (custom API-key header support, stricter URL/model validation, safer HTTP JSON handling), sandbox security tightening for git, documentation updates, and version alignment across packages/tests.
Changes:
- Bump core/UI package versions and propagate
HARNESS_VERSION/SDK_VERSIONto0.1.4across fixtures/tests. - Add optional custom API-key header support end-to-end (UI → BFF → gateway adapter), plus LiteLLM
/model/infodiscovery and stricter baseUrl/deployment/model-id validation. - Harden operational/security surfaces (HTTP JSON size caps, tighter
gitsandbox deny-flags, PID file permission mode), with expanded test coverage and updated docs/runbooks.
Reviewed changes
Copilot reviewed 37 out of 39 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ui/package.json | Bump UI package version to 0.1.4. |
| ui/package-lock.json | Lockfile updates (incl. deep-is range change). |
| ui/lib/types.ts | Mirror BFF contract: add credentialHeaderName to safe provider config. |
| ui/lib/api.ts | Extend gateway setup input to support optional apiKeyHeaderName. |
| ui/app/components/desktop/windows/PlaceholderBody.tsx | Update placeholder comment wording. |
| ui/app/components/desktop/modals/GatewaySetupDialog.tsx | Add API-key header field; Azure Foundry deployment requirement; updated guidance text. |
| ui/app/components/desktop/modals/GatewaySetupDialog.test.tsx | New UI tests for Azure deployment requirement and custom header submission. |
| tests/ui/read-handlers.test.ts | Update harness version fixture to 0.1.4. |
| tests/ui/gateway-setup.test.ts | Add gateway-setup validation and discovery/security tests (URL, headers, model limits, LiteLLM). |
| tests/ui/deps.test.ts | Add env-only custom API key header coverage. |
| tests/tools/sandbox.test.ts | Add regression tests for git external-command injection vectors. |
| tests/harness/sinks.test.ts | Update harness version fixture to 0.1.4. |
| tests/harness/fingerprint.test.ts | Update harness version fixture to 0.1.4. |
| tests/gateway/openai-adapter.test.ts | Add adapter tests for custom credential headers (Bearer vs raw token). |
| tests/gateway/http.test.ts | Add tests for gatewayFetch and capped JSON reading helpers. |
| tests/gateway/config.test.ts | Add config tests for header normalization/validation and baseUrl query/fragment rejection. |
| tests/cli/verify.test.ts | Update package version fixture to 0.1.4. |
| tests/cli/evidence.test.ts | Update harness version fixture to 0.1.4. |
| tests/audit/retention.test.ts | Update harness version fixture to 0.1.4. |
| tests/audit/report.test.ts | Update harness version fixture to 0.1.4. |
| tests/audit/persist.test.ts | Update harness version fixture to 0.1.4. |
| tests/audit/integration.test.ts | Update harness version fixture to 0.1.4. |
| tests/audit/index-api.test.ts | Update harness version fixture to 0.1.4. |
| tests/audit/build.test.ts | Update harness version fixture to 0.1.4. |
| src/ui/gateway-setup.ts | Add custom header support, LiteLLM discovery path, stricter validation, and safer JSON parsing. |
| src/ui/deps.ts | Update model discovery seam signature to include optional header name. |
| src/tools/types.ts | Tighten git sandbox deny-flags for external-driver/code-exec vectors. |
| src/sdk/index.ts | Bump SDK_VERSION to 0.1.4. |
| src/harness/session.ts | Bump HARNESS_VERSION to 0.1.4. |
| src/gateway/types.ts | Add optional apiKeyHeaderName to provider config type. |
| src/gateway/openai-adapter.ts | Support custom API-key headers and use capped JSON reader. |
| src/gateway/index.ts | Re-export header helpers and baseUrl validation. |
| src/gateway/http.ts | Add response size cap + readJsonCapped helper. |
| src/gateway/config.ts | Add header normalization/validation, baseUrl query/fragment checks, loopback hardening, safe projection updates. |
| src/cli/lifecycle.ts | Write PID file with restrictive permissions (mode 0600). |
| README.md | Update product/gateway setup docs including custom header and discovery behavior. |
| package.json | Bump root package version to 0.1.4. |
| package-lock.json | Lockfile updates (incl. deep-is range change). |
| docs/ui-runbook.md | Update UI runbook with custom header support and updated setup guidance. |
Files not reviewed (1)
- ui/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
ui/app/components/desktop/modals/GatewaySetupDialog.tsx:61
- The success path schedules
window.location.reload()viasetTimeout. In the jsdom test environment this call can throw (navigation not implemented) after the test finishes, causing flaky or failing UI unit tests (e.g.GatewaySetupDialog.test.tsxhits this path). Consider guarding the reload call so it can’t crash non-browser environments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Promotes dev to main for Keiko 0.1.4 release hardening.
Refs N/A
Scope
Product Impact
Verification
Required:
Local verification:
Select only what applies:
npm run prepackand package-surface checks.Not applicable rationale:
Review And Closure
Resolves #<issue_number>only when this PR should close the issue.Risk Notes
This PR only promotes already-green dev state to main for the 0.1.4 release.