Skip to content

Architecture remediation: streaming, security, standards - #3

Merged
ciotlos merged 2 commits into
mainfrom
fix/architecture-remediation
May 1, 2026
Merged

ciotlos merged 2 commits into
mainfrom
fix/architecture-remediation

Conversation

@ciotlos

@ciotlos ciotlos commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Full architectural remediation addressing streaming reliability, security, VS Code standards, and configuration management.

Streaming Reliability

  • SDK client timeouts (5min streaming, 30s control plane, 10s connection)
  • CancellationToken wired to AbortController for proper request abort
  • SDK client caching per region for connection reuse
  • Retry logic for transient errors (429, 5xx, network drops)
  • Typed stream as AsyncIterable<ConverseStreamOutput> instead of any

Security

  • Bearer token scoped to individual SDK calls via try/finally (no longer in global process.env)
  • Removed OpenRouter third-party API call — replaced with bundled static model metadata
  • Sensitive key redaction in logger (apiKey, secret, token → [REDACTED])
  • API key format validation with warning on unexpected format
  • Env var cleanup in deactivate()

Standards

  • Provider registration disposable pushed to context.subscriptions
  • Removed dead chatEndpoints code
  • Fixed all 56 lint issues → 0 errors, 0 warnings

Configuration

  • Removed no-op bedrock.selectModel command
  • Removed redundant "More Settings" QuickPick option
  • Settings now respect workspace scope when a workspace is open

Docs

  • Architecture diagram (Mermaid) with data flow table
  • Updated README: commands, features, model list
  • Added .kiro/ to .gitignore

Version

  • Bumped to 0.2.0

What was tested

  • npm run compile — zero errors
  • npm run lint — zero errors, zero warnings
  • Manual verification of all security constraints (grep for process.env, fetch, openrouter)

ciotlos added 2 commits May 1, 2026 16:10
… config

Streaming reliability:
- Add SDK client timeouts (5min streaming, 30s control, 10s connect)
- Wire CancellationToken to AbortController for proper request abort
- Cache SDK clients per region for connection reuse
- Add retry logic for transient errors (429, 5xx, network)
- Type stream as AsyncIterable<ConverseStreamOutput> instead of any

Security:
- Scope bearer token to individual SDK calls via try/finally
- Replace OpenRouter third-party API with bundled static metadata
- Add sensitive key redaction in logger (apiKey, secret, token)
- Add API key format validation with warning
- Clean up env vars in deactivate()

Standards:
- Push provider registration disposable to context.subscriptions
- Remove dead chatEndpoints code from ModelService
- Fix all 56 lint issues (0 errors, 0 warnings)

Configuration:
- Remove no-op bedrock.selectModel command
- Remove redundant "More Settings" QuickPick option
- Support workspace-level configuration scope

Docs:
- Add architecture diagram (Mermaid) and data flow table
- Update README commands, features, model list
- Add .kiro/ to .gitignore
@ciotlos
ciotlos merged commit 5f4bf35 into main May 1, 2026
@ciotlos
ciotlos deleted the fix/architecture-remediation branch May 1, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant