Skip to content

Release: merge Development into main - #267

Merged
Sandesh13fr merged 123 commits into
mainfrom
release/development-to-main
Nov 13, 2026
Merged

Sandesh13fr merged 123 commits into
mainfrom
release/development-to-main

Conversation

@Sandesh13fr

Copy link
Copy Markdown
Owner

Brings main up to date with Development: 123 commits from 30 authors that were never on the default branch. GitHub's contributor graph only counts the default branch, so none of this work showed up there.

Merge with a merge commit, not squash, so each contributor keeps authorship of their commits.

Conflicts resolved in the merge commit (main → Development):

  • CONTRIBUTING.md: main's guide and policy text, plus Development's first-contribution section, fork-based setup and required status checks.
  • PR template: one file (PULL_REQUEST_TEMPLATE.md); the two case-variant names collided on Windows/macOS. It now requires an assigned issue and a single open PR.
  • estimateCost, recommendModels, scanWorkspaceCommand: kept Development, which already contains main's changes.
  • scanCache: main's atomic temp-file write.
  • Removed duplicate preferredModelIds keys left by the auto-merge.

Local checks: build, typecheck, lint, and vitest run (57 files / 553 tests) pass.

🤖 Generated with Claude Code

profmohit-edu and others added 30 commits September 14, 2026 22:58
* fix(recommender): correct cached-token double-counting in estimateCost()

* fix(recommender): reject negative cachedInputTokens in estimateCost()
* fix(scanner): detect minified and bundled files as generated

isGeneratedFile compared path.extname() against compound suffixes like
.min.js, but extname only returns the final extension (.js), so the
check never matched. Generated assets outside build directories were
counted as source, inflating workspace token counts and cost estimates.
Match against the basename suffix instead, and correct the test that
was asserting the broken behavior.

Fixes #7

* test(scanner): add scan-level regression for generated file exclusion

Adds a scanWorkspace()-level test covering the outcome from #7: a
generated asset outside a build directory (src/vendor.min.js) is
flagged as generated, excluded from the workspace, and its tokens
are omitted from includedTokens. This fails against the pre-fix
classifier and passes against it, so it guards the regression rather
than testing classifyFile() in isolation.
* fix(dashboard): require authentication for saved report reads

GET /api/reports and GET /api/reports/:id returned data without
checking the bearer token that POST already required. Anyone on a
non-loopback host could enumerate and read saved reports, workspace
paths and file-level metadata included.

Reads now need the same bearer token as uploads. The dashboard UI is
a static export, so it can't embed the token — instead, browser reads
exchange the token once for an opaque session id at POST /api/session,
returned as an HttpOnly, SameSite=Strict cookie. That cookie only
grants reads. Uploads stay bearer-only, so a cross-site page can't use
the cookie to forge a write.

Added TCALC_DASHBOARD_PUBLIC_READ for deployments that want reports
readable without authentication, opt-in only. Also moved token
comparison into one shared helper using crypto.timingSafeEqual,
replacing the non-constant-time check the POST path had before.

Fixes #8

* fix(dashboard): fail closed when the token is unset, even with public read on

denyRead() checked publicRead before checking whether a token was
configured, so removing TCALC_DASHBOARD_TOKEN while
TCALC_DASHBOARD_PUBLIC_READ was still set left reports readable
anyway — the opposite of what the docs promise (unset token means
503 for everything).

Reordered so the token check runs first: an unset token now always
returns 503 for reads, regardless of publicRead. The flag only ever
relaxes access while a token exists.

Verified the new test actually guards this: reverting the ordering
makes it the only failing test in the suite.

* docs(dashboard): require HTTPS on non-loopback deployments

HttpOnly and SameSite=Strict protect the session cookie from page
scripts and cross-site misuse, but neither protects the token or
cookie in transit. Over plain HTTP, both travel in cleartext and are
readable by anyone on the network path. Added a note requiring TLS
(typically via a reverse proxy) for any deployment where
TCALC_DASHBOARD_HOST is not 127.0.0.1, and clarified that the server
marks the cookie Secure once it detects HTTPS, directly or via
x-forwarded-proto.
…n ties

A team policy's preferredModelIds had no effect on recommendations.
applyModelProfile() sorted preferred models first, but recommendModels()
immediately discarded that order — all three tier rankings end with
localeCompare(id), a strict total order that makes input sequence
irrelevant. The sort in applyModelProfile was dead code with respect to
every tier a user actually sees.

recommendModels() also had no parameter to receive the preference, so
even fixing the sort alone would not have helped.

Insert a preferenceRank tiebreak into each of the three sorts, between
the existing secondary scoring key and localeCompare, so it only
separates candidates already ranked equally by cost/score/confidence.
Scoring, filtering, and privacy handling are unchanged.

Thread preferredModelIds through the five call sites that already hold
the active profile: apps/cli recommend and report, the MCP
recommendModels and generateReport tools, and the VS Code
scanWorkspaceCommand.

Verified failing without the fix: reverting the three preferenceRank
insertions makes exactly the three new tiebreak tests fail, each on
the discriminating assertion.
Qodo flagged a missed call site in PR #36: generateAgentRulesTool.ts
also calls recommendModels() but never received preferredModelIds,
unlike the other five call sites already threaded. This one arguably
matters most — the three tier picks flow directly into
modelRecommendations and get written into the generated AGENTS.md /
.cursorrules file a team's agents actually read. Without this, a
team's preferred model was silently absent from their own generated
rules, despite docs/p3-capabilities.md promising 'generated rules
enforce this policy.'

Audited all recommendModels() call sites in the repo (six total,
confirmed via grep) to verify no seventh gap exists.

Verification: full suite 43 files / 289 tests passed, CLI and
VS Code extension typechecks pass.
Validate workspace configuration and surface malformed or invalid values instead of silently falling back to defaults.
Apply ignore and size rules to in-workspace symlinked files before scanner queueing, with regression coverage.
Keep scanner-classified generated files visible in repo-map guidance after exclusion, deduplicate exclusion recommendations, and add end-to-end coverage.
The maintainer requested executable coverage across the full pipeline,
not just unit tests on recommendModels() — unit tests alone missed the
generateAgentRulesTool.ts call site (caught only by Qodo's review).

Adds two tests that write a real .tcalc/team.json and .tcalc/models.json
to a temp workspace and run the actual executeRecommend CLI command
against them, exercising every layer: file read (loadTeamPolicy) ->
policy parse (parseTeamPolicy) -> profile lookup (getActiveModelProfile)
-> catalog filter (applyModelProfile) -> recommendModels -> final output.

The two catalog models are identical in every scored dimension, so only
the preference tiebreak can separate them. The preferred id sorts after
the other alphabetically, so a control run with no team.json proves the
tie is genuine (localeCompare picks the untied model), and the second
run flips the pick once the policy is written.

Verified non-vacuity by breaking five layers independently (recommender
comparator, CLI call-site wiring, getActiveModelProfile, team.json
parsing, and the file read itself) and confirming each turns the test
red. Note this test resolves workspace packages through their built
dist/ output, so it requires a rebuild after editing package source --
already covered by the root pnpm build && pnpm test sequence.

Full suite: 43 files, 291 tests passed.
* fix(scanner): block path traversal in additionalIgnoreFiles

* fix(scanner): resolve ignore-file symlinks and enforce workspace containment
* fix(mcp-server): add timeout to workspace scan tool

* fix(mcp-server): advertise timeoutMs in scan_workspace discovery schema
)

* fix(scanner): scan full file text for secrets, not just 4KB preview

* fix(scanner): bump scan-cache to v2 so stale preview-only entries are rescanned
* fix(recommender): require local support in local-first mode

* test(recommender): cover hybrid local-first filtering

* docs(core): clarify local-first privacy contract

* docs: clarify privacy-mode guarantees

* test(recommender): keep tier dedup cases privacy-neutral
CristonInfantoRex and others added 25 commits October 11, 2026 16:12
* fix(repo-map): preserve control-flow blocks during compaction

* fix(repo-map): preserve chained control-flow headers during compaction

* test: assert control-flow structure is preserved

---------

Co-authored-by: TCalc Integration Check <integration-check@localhost>
Co-authored-by: Sandesh Prakash Dawkhar <107756643+Sandesh13fr@users.noreply.github.com>
Co-authored-by: Sandesh Prakash Dawkhar <107756643+Sandesh13fr@users.noreply.github.com>
Reconstruct #170 on current Development with multi-root state and fallback save, cancellation, and write failure regression coverage.

Co-authored-by: TCalc Integration Check <integration-check@localhost>
Co-authored-by: Sandesh Prakash Dawkhar <107756643+Sandesh13fr@users.noreply.github.com>
…143)

Co-authored-by: Meghana <m.meghana@cmr.edu.in>
Co-authored-by: Sandesh Prakash Dawkhar <107756643+Sandesh13fr@users.noreply.github.com>
docs: make beginner contribution paths welcoming and explicit
Add a prerequisites sentence before the source-build command block in
Use the CLI, noting Node.js 22 and pnpm 11.5.2 and linking to
CONTRIBUTING.md for the fork/clone and setup walkthrough. The versions
match the root packageManager field and the CI Node version. Existing
CLI examples are unchanged.

Fixes #188
…reqs

docs(readme): note Node.js 22 and pnpm 11.5.2 prerequisites
fix(reports): escape token-drift Markdown values (fixes #151)
fix(mcp): preserve overflow warnings in compact recommendations
…ntage

fix: standardize language breakdown percentages
recommend_models, generate_report, generate_agent_rules and create_repo_map
read policy.defaultGoal before the goal argument, so a team default
silently replaced an explicit goal. The CLI already uses
--goal ?? defaultGoal; the MCP tools now match it.

Fixes #200
Co-authored-by: Sandesh Prakash Dawkhar <107756643+Sandesh13fr@users.noreply.github.com>
Resolves conflicts between the two lines of history:
- CONTRIBUTING.md: keep main's guide and policy text, add Development's
  first-contribution section, fork-based setup and required status checks.
- PR template: keep one file (main's PULL_REQUEST_TEMPLATE.md; the two
  case-variant names collide on Windows/macOS), updated to require an
  assigned issue and a single open PR.
- estimateCost / recommendModels / scanWorkspaceCommand: keep Development
  (already contains main's preferred-model and validation changes).
- scanCache: take main's atomic temp-file write, keep SCAN_CACHE_VERSION.
- Drop duplicate preferredModelIds keys introduced by the auto-merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalog command tests and CLI smoke validated the bundled catalog
against the real clock, so every PR failed once catalogs/models.json
passed 90 days. Tests now pin the clock to the catalog's own updatedAt,
catalog validate gains --max-age-days (default 90), and smoke checks the
command runs without asserting data age.

Fixes #218

Co-authored-by: TCalc Integration Check <integration-check@localhost>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tcalc Ready Ready Preview Nov 13, 2026 10:40am UTC

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 123 files, which is 23 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 10705f4 and 004ca2a.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 123

  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/ci.yml
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • README.md
  • apps/cli/src/commands/catalog.ts
  • apps/cli/src/commands/init.ts
  • apps/cli/src/commands/recommend.ts
  • apps/cli/src/commands/report.ts
  • apps/cli/src/commands/scan.ts
  • apps/cli/src/index.ts
  • apps/cli/src/utils/loadWorkspaceConfig.ts
  • apps/cli/tests/catalogCommand.test.ts
  • apps/cli/tests/help.test.ts
  • apps/cli/tests/initCommand.test.ts
  • apps/cli/tests/recommendCommand.test.ts
  • apps/cli/tests/repoMapCommand.test.ts
  • apps/cli/tests/scanCommand.test.ts
  • apps/dashboard/components/ReportViewer.tsx
  • apps/dashboard/lib/docs.ts
  • apps/dashboard/package.json
  • apps/dashboard/src/server.mjs
  • apps/dashboard/tests/server.test.mjs
  • apps/jetbrains-plugin/src/main/kotlin/com/tcalc/plugin/settings/WmaSettingsState.kt
  • apps/jetbrains-plugin/src/test/kotlin/com/tcalc/plugin/settings/WmaSettingsStateTest.kt
  • apps/vscode-extension/package.json
  • apps/vscode-extension/src/commands/compareModelsCommand.ts
  • apps/vscode-extension/src/commands/exportReportCommand.ts
  • apps/vscode-extension/src/commands/generateAgentRulesCommand.ts
  • apps/vscode-extension/src/commands/generateMcpConfigCommand.ts
  • apps/vscode-extension/src/commands/generateRepoMapCommand.ts
  • apps/vscode-extension/src/commands/openDashboardCommand.ts
  • apps/vscode-extension/src/commands/scanWorkspaceCommand.ts
  • apps/vscode-extension/src/commands/setWorkspaceGoalCommand.ts
  • apps/vscode-extension/src/commands/updateModelCatalogCommand.ts
  • apps/vscode-extension/src/extension.ts
  • apps/vscode-extension/src/test/runTest.ts
  • apps/vscode-extension/src/test/suite/index.ts
  • apps/vscode-extension/src/views/dashboardPanel.ts
  • apps/vscode-extension/src/views/sidebarProvider.ts
  • apps/vscode-extension/src/workspaceContext.ts
  • apps/vscode-extension/tests/multiRootCommands.test.ts
  • apps/vscode-extension/tests/workspaceContext.test.ts
  • docs/team-dashboard.md
  • packages/agent-rules/src/generateCopilotInstructions.ts
  • packages/agent-rules/src/generateGeminiRules.ts
  • packages/agent-rules/src/generateRules.ts
  • packages/agent-rules/src/generateWindsurfRules.ts
  • packages/agent-rules/src/index.ts
  • packages/agent-rules/src/multiFormatRules.ts
  • packages/agent-rules/tests/multiFormatRules.test.ts
  • packages/core/src/index.ts
  • packages/core/src/teamPolicy.ts
  • packages/core/src/types/drift.ts
  • packages/core/src/types/options.ts
  • packages/core/tests/teamPolicy.test.ts
  • packages/mcp-server/package.json
  • packages/mcp-server/src/server.ts
  • packages/mcp-server/src/tools/createRepoMapTool.ts
  • packages/mcp-server/src/tools/estimateFilesTokensTool.ts
  • packages/mcp-server/src/tools/generateAgentRulesTool.ts
  • packages/mcp-server/src/tools/generateReportTool.ts
  • packages/mcp-server/src/tools/recommendModelsTool.ts
  • packages/mcp-server/src/tools/scanWorkspaceTool.ts
  • packages/mcp-server/src/utils/compactResults.ts
  • packages/mcp-server/tests/estimateFilesTokensTool.test.ts
  • packages/mcp-server/tests/recommendModelsTool.test.ts
  • packages/mcp-server/tests/scanWorkspaceTool.test.ts
  • packages/mcp-server/tests/teamPolicy.test.ts
  • packages/model-catalog/src/index.ts
  • packages/model-catalog/src/loadModelCatalog.ts
  • packages/model-catalog/src/queryModelCatalog.ts
  • packages/model-catalog/src/types/catalogQuery.ts
  • packages/model-catalog/tests/loadModelCatalog.test.ts
  • packages/model-catalog/tests/queryModelCatalog.test.ts
  • packages/recommender/src/costOptimizationAdvisor.ts
  • packages/recommender/src/estimateCost.ts
  • packages/recommender/src/index.ts
  • packages/recommender/src/recommendModels.ts
  • packages/recommender/src/types/costAdvisor.ts
  • packages/recommender/tests/costOptimizationAdvisor.test.ts
  • packages/recommender/tests/estimateCost.test.ts
  • packages/recommender/tests/recommendModels.test.ts
  • packages/repo-map/src/budgetRepoMap.ts
  • packages/repo-map/src/compactor/compactionLevels.ts
  • packages/repo-map/src/compactor/progressiveCompactor.ts
  • packages/repo-map/src/index.ts
  • packages/repo-map/src/selectImportantFiles.ts
  • packages/repo-map/src/symbols/detectFrameworkRoutes.ts
  • packages/repo-map/src/symbols/extractSymbols.ts
  • packages/repo-map/src/symbols/parseFileSymbols.ts
  • packages/repo-map/tests/createRepoMap.test.ts
  • packages/repo-map/tests/progressiveCompactor.test.ts
  • packages/repo-map/tests/selectImportantFiles.test.ts
  • packages/repo-map/tests/symbols/detectFrameworkRoutes.test.ts
  • packages/repo-map/tests/symbols/extractSymbols.test.ts
  • packages/reports/src/analyzeTokenDrift.ts
  • packages/reports/src/formatDriftMarkdown.ts
  • packages/reports/src/generateJsonReport.ts
  • packages/reports/src/generateMarkdownReport.ts
  • packages/reports/src/index.ts
  • packages/reports/tests/analyzeTokenDrift.test.ts
  • packages/reports/tests/generateJsonReport.test.ts
  • packages/reports/tests/generateMarkdownReport.test.ts
  • packages/scanner/src/classifyFile.ts
  • packages/scanner/src/gitStatusResolver.ts
  • packages/scanner/src/ignoreResolver.ts
  • packages/scanner/src/index.ts
  • packages/scanner/src/scanCache.ts
  • packages/scanner/src/scanWorkspace.ts
  • packages/scanner/src/types/gitFilter.ts
  • packages/scanner/tests/classifyFile.test.ts
  • packages/scanner/tests/gitStatusResolver.test.ts
  • packages/scanner/tests/ignoreResolver.test.ts
  • packages/scanner/tests/scanWorkspace.test.ts
  • packages/tokenizers/src/countWorkspaceTokens.ts
  • packages/tokenizers/src/heuristicTokenizer.ts
  • packages/tokenizers/src/index.ts
  • packages/tokenizers/src/tokenDensityEstimator.ts
  • packages/tokenizers/src/types/density.ts
  • packages/tokenizers/tests/countWorkspaceTokens.test.ts
  • packages/tokenizers/tests/tokenDensityEstimator.test.ts
  • scripts/smoke-cli.mjs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@Sandesh13fr
Sandesh13fr merged commit 4db22a4 into main Nov 13, 2026
13 of 14 checks passed

This branch was successfully deployed

1 active deployment
Preview — 004ca2a9 Deployed Nov 13, 2026 by vercel[bot]
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.