Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

test: cover feed projection, secret redaction, and catalog gates

open
Stack 2/2
#341 opened by cursor[bot]cursor/missing-test-coverage-4220→main
Conversation0
cursor[bot]
Commits
0
Files changed…
opened this pull request
Author
· last week

Risky behavior now covered

  • Projected transcript items: blank/unknown item types and invalid tool/error enums fail closed. Empty completed reasoning is dropped. Optimistic user bubbles upsert on clientMessageId. A later non-terminal tool start cannot unwind a completed tool. Agent/reasoning deltas append only onto matching kinds.
  • MCP tool identity: server/tool names normalize consistently, and blank names collide on one mcp______ identity used by tool routing and profile allowlists.
  • Provider catalog gates: custom model IDs stay off codex-cli/lmstudio; model preferences include codex-cli only. Untrimmed/non-string provider names fail closed.
  • Custom model IDs: blank, control-character, and >2048-char ids are rejected before they hit the store.
  • Telemetry redaction: PEM keys, Bearer/Basic tokens, assignment secrets, credential URLs, GitHub/Slack/AWS/Google tokens, JWTs, emails, prompt bodies, and JSON payloads are stripped; short/benign strings stay intact.
  • MCP credential documents: extras, wrong versions, blank server names, and invalid timestamps fail closed.
  • Skill improvement: plugin-owned and non-writable user/project skills cannot be rewritten; built-in copies remain eligible for shadowing.

Test files added/updated

  • test/shared/projected-items.test.ts
  • test/mcp.names.test.ts
  • test/shared/provider-allowlists.test.ts
  • test/providers/custom-model-id.test.ts
  • test/diagnostics.sensitive-text.test.ts
  • test/mcp.credentials-doc.test.ts
  • test/skillImprovement.write-restriction.test.ts

Why these tests materially reduce regression risk

These helpers sit on transcript persistence, tool-policy matching, model-catalog writes, crash/telemetry scrubbing, MCP credential import, and skill mutation. A silent change can leak secrets, admit unsupported providers, collide MCP tools, or rewrite a completed tool/user bubble. The new tests lock the fail-closed contracts without changing production behavior.

Main is still e2d5f95e. This run does not duplicate open coverage PRs #331–#340.

Validation

  • Targeted 28 tests + platform-boundary: green
  • bun run check and bun run typecheck: clean
  • Isolated targeted files are the evidence (full suite historically truncates late on this host)
Open in Web View Automation 
This branch can’t be merged automatically yet
Branch comparison failed — verify branches still exist in storage.
0 approving reviews
None yet
Checks
No checks recorded
Fast-forward
Source must contain the target branch tip
main ← cursor/missing-test-coverage-4220

Sign in to comment.

Stack

2/2
1

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.

Update README.md

#125 mobile-fixes ← main

Updated 4 months ago

merged
2

test: cover feed projection, secret redaction, and catalog gates

#341 main ← cursor/missing-test-coverage-4220

Updated last week

open