Skip to content

feat(mcp): add local workspace intelligence v2 - #70

Merged
JSONbored merged 6 commits into
JSONbored:mainfrom
monsterdavidliu-ux:feat/42-workspace-intelligence-v2
Jun 1, 2026
Merged

feat(mcp): add local workspace intelligence v2#70
JSONbored merged 6 commits into
JSONbored:mainfrom
monsterdavidliu-ux:feat/42-workspace-intelligence-v2

Conversation

@monsterdavidliu-ux

@monsterdavidliu-ux monsterdavidliu-ux commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add workspaceIntelligence v2 on local branch analysis with changed-file summaries, test-evidence levels, CI hints, pending commit counts, separated branch-quality vs account blockers, and metadata-only scorer diagnostics.
  • Extend MCP git collection for pending commits, CI hints, renamed/deleted/binary paths, and clearer analyze-branch / preflight / agent plan CLI output.
  • Treat passed local validation commands as test evidence in preflight when no test files changed.

Review feedback addressed

  • Resolved merge conflict in src/api/routes.ts (kept pendingCommitCount / ciStatusHints with main's string length limits).
  • repoRoot is passed only in scorer stdin metadata (scorerMetadata), not in returned branch analysis / API payloads.
  • Source-upload guard and local-path redaction tests retained.
  • Merged latest main and restored CI branch coverage (≥97%).

Test plan

  • PATH=/usr/bin:/bin:$PATH npm run test:ci (≥97% global branch coverage)
  • npm run typecheck
  • npm run build:mcp
  • Unit tests for renamed/binary/deleted files, validation-as-evidence, stale base, missing scorer, and source-upload guard
  • buildBranchAnalysisPayload does not expose repoRoot in API-facing output

Fixes #42

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@monsterdavidliu-ux useful MCP direction, but one privacy regression and a conflict need fixing.

Required:

  • Resolve the conflict in src/api/routes.ts.
  • Do not mutate returned/sent branch metadata with metadata.repoRoot; keep repoRoot only in scorer-local metadata so local paths never enter API payloads.
  • Keep the source-upload guard and local-path redaction tests.
  • Re-run full validation after the conflict fix.

Expose structured workspace metadata for branch analysis: changed-file
summaries, validation-as-test-evidence, pending commits, CI hints, separated
branch vs account blockers, and metadata-only scorer diagnostics without
uploading source.

- Keep repoRoot in scorer-only stdin metadata, not API/MCP payloads
- Merge main and resolve routes.ts schema conflict for workspace fields

Fixes JSONbored#42
@monsterdavidliu-ux
monsterdavidliu-ux force-pushed the feat/42-workspace-intelligence-v2 branch from a406111 to e3a0a3d Compare May 31, 2026 13:51
Pin data-quality and queue processor tests to fixed clock times so
freshness SLO assertions stay stable across CI runs.
Add test-evidence path coverage, workspace intelligence edge cases, and
regenerate the UI OpenAPI spec for workspace v2 fields.
@monsterdavidliu-ux
monsterdavidliu-ux force-pushed the feat/42-workspace-intelligence-v2 branch from bd913e8 to 551927c Compare June 1, 2026 15:05
@JSONbored
JSONbored self-requested a review June 1, 2026 17:35

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@monsterdavidliu-ux This is ready from my side. The prior privacy blocker is resolved: repoRoot stays in scorer-local metadata, normal API/MCP payloads remain metadata-only, source upload is explicitly disabled, and the tests cover local-path/source-upload boundaries. CI is green and the branch is merge-clean.

@dosubot dosubot Bot added the lgtm label Jun 1, 2026
@JSONbored
JSONbored merged commit 7337e2b into JSONbored:main Jun 1, 2026
3 checks passed
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): add local workspace intelligence v2

2 participants