Skip to content

fix(review): ground newly added files#3976

Merged
JSONbored merged 2 commits into
mainfrom
codex/fix-added-files-bypassing-ai-review-grounding
Jul 7, 2026
Merged

fix(review): ground newly added files#3976
JSONbored merged 2 commits into
mainfrom
codex/fix-added-files-bypassing-ai-review-grounding

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The previous change excluded added files from full-file grounding, relying on the incorrect assumption that the bounded diff always contains every added line which can let newly added code be omitted from both the diff and grounding fallback. This weakens gate-relevant AI reviews and allows contributor-controlled added files to hide content from reviewers.

Description

  • Restore fetching of newly added files in fetchFullFileContents by removing the status !== "added" exclusion and update the inline comment to explain why added files still require the full-file fallback; removed/binary files remain excluded via removed and SKIP_EXT checks. (changed src/review/review-grounding.ts).
  • Add a regression unit test that proves an added file is fetched and inlined so the fallback covers patch-less or truncated diffs (updated test/unit/review-grounding.test.ts).
  • Preserve the existing budget, per-file caps, and truncated-file markers so behavior is fail-safe and bounded when large or unreadable files are encountered.

Testing

  • Ran unit tests: npx vitest run test/unit/review-grounding.test.ts and npx vitest run test/unit/review-grounding.test.ts test/unit/review-diff.test.ts — both passed locally (unit suites green).
  • Typecheck: npm run typecheck succeeded with no type errors.
  • Coverage: attempting npm run test:coverage executed the tests but the coverage remapping step failed in this environment with TypeError: jsTokens is not a function (coverage run did not fully complete here).
  • Full gate: npm run test:ci was started but the full unsharded CI/coverage run did not complete in this container; npm audit --audit-level=moderate could not complete due to the environment's npm audit endpoint returning 403 Forbidden.

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@gittensory-orb gittensory-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. label Jul 7, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-07 10:00:31 UTC

2 files · 2 blockers · readiness 93/100 · CI failing · blocked

🛑 Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

Why this is blocked

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

CI checks failing

  • validate
  • validate-code
Signal Result Evidence
Code review ❌ 2 blockers No AI review summary
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 569 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 569 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 569 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

❌ 57 Tests Failed:

Tests completed Failed Passed Skipped
10410 57 10353 7
View the top 3 failed test(s) by shortest run time
test/integration/api.test.ts > test/integration/api.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/maintainer-activation.test.ts > test/integration/maintainer-activation.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/orb-broker.test.ts > test/integration/orb-broker.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/orb-ingest.test.ts > test/integration/orb-ingest.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/orb-oauth.test.ts > test/integration/orb-oauth.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/orb-onboarding.test.ts > test/integration/orb-onboarding.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/orb-relay.test.ts > test/integration/orb-relay.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/orb-webhook.test.ts > test/integration/orb-webhook.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/public-quality-metrics-route-error.test.ts > test/integration/public-quality-metrics-route-error.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/public-stats-route-error.test.ts > test/integration/public-stats-route-error.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/public-stats-route.test.ts > test/integration/public-stats-route.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/routes-errors.test.ts > test/integration/routes-errors.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/integration/subnet-interface.test.ts > test/integration/subnet-interface.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/access-boundary.test.ts > test/unit/access-boundary.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/ai-key-byok.test.ts > test/unit/ai-key-byok.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/docs-examples-schema.test.ts > test/unit/docs-examples-schema.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/draft.test.ts > test/unit/draft.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/index.test.ts > test/unit/index.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/issue-watch.test.ts > test/unit/issue-watch.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/linear-key.test.ts > test/unit/linear-key.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-automation-state.test.ts > test/unit/mcp-automation-state.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-check-slop-risk.test.ts > test/unit/mcp-check-slop-risk.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-fleet-analytics.test.ts > test/unit/mcp-fleet-analytics.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-miner-prompts.test.ts > test/unit/mcp-miner-prompts.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-notifications.test.ts > test/unit/mcp-notifications.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-output-schemas.test.ts > test/unit/mcp-output-schemas.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-plan-dag.test.ts > test/unit/mcp-plan-dag.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-planning-elicitation.test.ts > test/unit/mcp-planning-elicitation.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-predict-gate.test.ts > test/unit/mcp-predict-gate.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-refresh-repo-docs.test.ts > test/unit/mcp-refresh-repo-docs.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-run-local-scorer.test.ts > test/unit/mcp-run-local-scorer.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-suggest-boundary-tests.test.ts > test/unit/mcp-suggest-boundary-tests.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-upstream.test.ts > test/unit/mcp-upstream.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-write-tools.test.ts > test/unit/mcp-write-tools.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/ops-wire.test.ts > test/unit/ops-wire.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/parity-wire.test.ts > test/unit/parity-wire.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/plan-templates.test.ts > test/unit/plan-templates.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/retention.test.ts > test/unit/retention.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-agent-approval.test.ts > test/unit/routes-agent-approval.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-ai-byok.test.ts > test/unit/routes-ai-byok.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-check-before-start.test.ts > test/unit/routes-check-before-start.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-contributor-issue-draft.test.ts > test/unit/routes-contributor-issue-draft.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-extension.test.ts > test/unit/routes-extension.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-focus-manifest.test.ts > test/unit/routes-focus-manifest.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-kill-switch.test.ts > test/unit/routes-kill-switch.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-remediation-plan.test.ts > test/unit/routes-remediation-plan.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-self-dogfood-registration-pack.test.ts > test/unit/routes-self-dogfood-registration-pack.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/routes-selfhost-dead-letter-queue.test.ts > test/unit/routes-selfhost-dead-letter-queue.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-server-telemetry.test.ts > MCP server telemetry > falls back when Hono does not expose an execution context
Stack Traces | 0.017s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/mcp-server-telemetry.test.ts > MCP server telemetry > records session-scoped MCP request errors without a tool name
Stack Traces | 0.0207s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/config-templates.test.ts > config/examples review templates (#1682) > gittensory.full.yml body matches .gittensory.yml.example from WHERE IT LIVES onward
Stack Traces | 0.0222s run time
AssertionError: expected '# WHERE IT LIVES (first match wins):\…' to be '# WHERE IT LIVES (first match wins):\…' // Object.is equality

- Expected
+ Received

@@ -326,17 +326,10 @@
  # All values shown are the safe defaults; delete any line to inherit it.
  #
  # Review output controls. These tune review output without changing the
  # deterministic gate policy above. Omit the block to keep the byte-identical
  # defaults.
- #
- # SELF-HOST ONLY (`review.shared_config`, #2046): when `GITTENSORY_REPO_CONFIG_DIR` is mounted,
- # place a shared review base at `${GITTENSORY_REPO_CONFIG_DIR}/_shared/.gittensory.yml` (see
- # `config/examples/shared.gittensory.yml`). Per-repo `review:` keys overlay it field-by-field —
- # repo value wins when set, shared fills gaps, defaults stay byte-identical. Absent shared base is
- # the common case and changes nothing. A malformed shared base warns and is ignored (never blocks a
- # review). The loader records provenance at runtime in `review.sharedConfigSource` (not a YAML key).
  review:
    # Deterministic AI review eligibility filters (`review.auto_review`, #1954 / #2038–#2065). Each knob quietly
    # skips the advisory AI review for matching PRs — never a gate failure. When the Orb review check is enabled,
    # skipped PRs complete as "skipped" with a human-readable reason (see `evaluateAutoReviewSkipReason` in
    # `src/signals/focus-manifest.ts` and the public-surface `SKIP_SUMMARY.ignored_author` mapping in

 ❯ test/unit/config-templates.test.ts:36:57
test/unit/predicted-gate-engine-coverage.test.ts > predicted-gate engine module coverage (#2283) > exercises duplicate-winner election helpers
Stack Traces | 0.0257s run time
AssertionError: expected false to be true // Object.is equality

- Expected
+ Received

- true
+ false

 ❯ test/unit/predicted-gate-engine-coverage.test.ts:109:155
test/unit/mcp-server-telemetry.test.ts > MCP server telemetry > records sanitized error telemetry when the MCP transport handler throws
Stack Traces | 0.214s run time
Error: Failed to resolve entry for package "@jsonbored/gittensory-engine". The package may have incorrect main/module/exports specified in its package.json.
 ❯ .../gittensory-miner/lib/opportunity-fanout.js:2:1
 ❯ src/mcp/find-opportunities.ts:11:1
test/unit/queue.test.ts > auto-action convergence: end-to-end plan+execute for the general heuristic path (#selfhost-auto-action-convergence) > REGRESSION (#terminal-outcome-audit): an engaged holdonly breaker withholds a real would-merge AND increments the downgrade counter
Stack Traces | 0.555s run time
AssertionError: expected '# HELP gittensory_github_response_cac…' to contain 'gittensory_agent_disposition_total{ac…'

- Expected
+ Received

- gittensory_agent_disposition_total{action_class="hold",autonomy_level="observe",blocker_class="none"} 1
+ # HELP gittensory_github_response_cache_total GitHub response cache outcomes by response class.
+ # TYPE gittensory_github_response_cache_total counter
+ gittensory_github_response_cache_total{class="sensitive",result="bypassed"} 14
+ # HELP gittensory_pr_state_cache_total Pull-request state cache outcomes.
+ # TYPE gittensory_pr_state_cache_total counter
+ gittensory_pr_state_cache_total{field="write",result="set"} 1
+ # HELP gittensory_ci_state_cache_total CI-state snapshot cache outcomes.
+ # TYPE gittensory_ci_state_cache_total counter
+ gittensory_ci_state_cache_total{field="aggregate",result="miss"} 1
+ gittensory_ci_state_cache_total{field="write",result="set"} 2
+ gittensory_github_response_cache_total{class="disabled",result="bypassed"} 10
+ # HELP gittensory_github_graphql_cache_total GitHub GraphQL cache outcomes by response class.
+ # TYPE gittensory_github_graphql_cache_total counter
+ gittensory_github_graphql_cache_total{class="sensitive",result="bypassed"} 2
+ gittensory_ci_state_cache_total{field="aggregate",result="forced"} 1
+ # HELP gittensory_precision_breaker_downgrades_total Would-merge/would-close actions downgraded to a human hold by an accuracy circuit-breaker, by breaker direction.
+ # TYPE gittensory_precision_breaker_downgrades_total counter
+ gittensory_precision_breaker_downgrades_total{direction="merge"} 1
+ # HELP gittensory_agent_disposition_total Final agent disposition per PR pass (merge/close/hold), by repo, action class, blocker-code class, and autonomy level.
+ # TYPE gittensory_agent_disposition_total counter
+ gittensory_agent_disposition_total{action_class="hold",autonomy_level="observe",blocker_class="none",repo="redacted-1"} 1
+

 ❯ test/unit/queue.test.ts:27378:35
test/unit/queue.test.ts > auto-action convergence: end-to-end plan+execute for the general heuristic path (#selfhost-auto-action-convergence) > a guardrail-path hold (neutral gate conclusion) records blocker_class=guardrail_hold, not 'none'
Stack Traces | 0.674s run time
AssertionError: expected '# HELP gittensory_github_response_cac…' to contain 'gittensory_agent_disposition_total{ac…'

- Expected
+ Received

- gittensory_agent_disposition_total{action_class="hold",autonomy_level="auto",blocker_class="guardrail_hold"} 1
+ # HELP gittensory_github_response_cache_total GitHub response cache outcomes by response class.
+ # TYPE gittensory_github_response_cache_total counter
+ gittensory_github_response_cache_total{class="disabled",result="bypassed"} 11
+ gittensory_github_pull_request_files_fetch_total{caller="live_review"} 1
+ gittensory_github_response_cache_total{class="sensitive",result="bypassed"} 17
+ # HELP gittensory_pr_state_cache_total Pull-request state cache outcomes.
+ # TYPE gittensory_pr_state_cache_total counter
+ gittensory_pr_state_cache_total{field="mergeable_state",result="miss"} 1
+ gittensory_pr_state_cache_total{field="write",result="set"} 1
+ # HELP gittensory_ci_state_cache_total CI-state snapshot cache outcomes.
+ # TYPE gittensory_ci_state_cache_total counter
+ gittensory_ci_state_cache_total{field="aggregate",result="miss"} 1
+ gittensory_ci_state_cache_total{field="write",result="set"} 2
+ # HELP gittensory_github_graphql_cache_total GitHub GraphQL cache outcomes by response class.
+ # TYPE gittensory_github_graphql_cache_total counter
+ gittensory_github_graphql_cache_total{class="sensitive",result="bypassed"} 2
+ gittensory_ci_state_cache_total{field="aggregate",result="forced"} 1
+ # HELP gittensory_agent_disposition_total Final agent disposition per PR pass (merge/close/hold), by repo, action class, blocker-code class, and autonomy level.
+ # TYPE gittensory_agent_disposition_total counter
+ gittensory_agent_disposition_total{action_class="hold",autonomy_level="auto",blocker_class="guardrail_hold",repo="redacted-1"} 1
+

 ❯ test/unit/queue.test.ts:27176:35
test/unit/queue.test.ts > auto-action convergence: end-to-end plan+execute for the general heuristic path (#selfhost-auto-action-convergence) > REGRESSION (#selfhost-backlog-convergence): a CI-pending PR defers, then merges once check_suite.completed reports CI green (convergence chain)
Stack Traces | 0.713s run time
AssertionError: expected '# HELP gittensory_github_response_cac…' to contain 'gittensory_agent_disposition_total{ac…'

- Expected
+ Received

- gittensory_agent_disposition_total{action_class="merge",autonomy_level="auto",blocker_class="none"} 1
+ # HELP gittensory_github_response_cache_total GitHub response cache outcomes by response class.
+ # TYPE gittensory_github_response_cache_total counter
+ gittensory_github_response_cache_total{class="sensitive",result="bypassed"} 16
+ # HELP gittensory_pr_state_cache_total Pull-request state cache outcomes.
+ # TYPE gittensory_pr_state_cache_total counter
+ gittensory_pr_state_cache_total{field="write",result="set"} 1
+ # HELP gittensory_ci_state_cache_total CI-state snapshot cache outcomes.
+ # TYPE gittensory_ci_state_cache_total counter
+ gittensory_ci_state_cache_total{field="aggregate",result="miss"} 1
+ gittensory_ci_state_cache_total{field="write",result="set"} 2
+ gittensory_github_response_cache_total{class="disabled",result="bypassed"} 9
+ # HELP gittensory_github_graphql_cache_total GitHub GraphQL cache outcomes by response class.
+ # TYPE gittensory_github_graphql_cache_total counter
+ gittensory_github_graphql_cache_total{class="sensitive",result="bypassed"} 2
+ gittensory_ci_state_cache_total{field="aggregate",result="forced"} 1
+ # HELP gittensory_agent_disposition_total Final agent disposition per PR pass (merge/close/hold), by repo, action class, blocker-code class, and autonomy level.
+ # TYPE gittensory_agent_disposition_total counter
+ gittensory_agent_disposition_total{action_class="merge",autonomy_level="auto",blocker_class="none",repo="redacted-1"} 1
+

 ❯ test/unit/queue.test.ts:27304:35
test/unit/queue.test.ts > auto-action convergence: end-to-end plan+execute for the general heuristic path (#selfhost-auto-action-convergence) > REGRESSION: a blocked contributor PR (plain gate failure) with close=auto is actually closed via the general heuristic-close path
Stack Traces | 1.17s run time
AssertionError: expected '# HELP gittensory_github_response_cac…' to contain 'gittensory_agent_disposition_total{ac…'

- Expected
+ Received

- gittensory_agent_disposition_total{action_class="close",autonomy_level="auto",blocker_class="missing_linked_issue"} 1
+ # HELP gittensory_github_response_cache_total GitHub response cache outcomes by response class.
+ # TYPE gittensory_github_response_cache_total counter
+ gittensory_github_response_cache_total{class="disabled",result="bypassed"} 11
+ gittensory_github_pull_request_files_fetch_total{caller="live_review"} 3
+ gittensory_github_response_cache_total{class="sensitive",result="bypassed"} 18
+ # HELP gittensory_pr_state_cache_total Pull-request state cache outcomes.
+ # TYPE gittensory_pr_state_cache_total counter
+ gittensory_pr_state_cache_total{field="mergeable_state",result="miss"} 1
+ gittensory_pr_state_cache_total{field="write",result="set"} 1
+ # HELP gittensory_ci_state_cache_total CI-state snapshot cache outcomes.
+ # TYPE gittensory_ci_state_cache_total counter
+ gittensory_ci_state_cache_total{field="aggregate",result="miss"} 1
+ gittensory_ci_state_cache_total{field="write",result="set"} 2
+ # HELP gittensory_github_graphql_cache_total GitHub GraphQL cache outcomes by response class.
+ # TYPE gittensory_github_graphql_cache_total counter
+ gittensory_github_graphql_cache_total{class="sensitive",result="bypassed"} 2
+ gittensory_ci_state_cache_total{field="aggregate",result="forced"} 1
+ # HELP gittensory_agent_disposition_total Final agent disposition per PR pass (merge/close/hold), by repo, action class, blocker-code class, and autonomy level.
+ # TYPE gittensory_agent_disposition_total counter
+ gittensory_agent_disposition_total{action_class="close",autonomy_level="auto",blocker_class="missing_linked_issue",repo="redacted-1"} 1
+

 ❯ test/unit/queue.test.ts:27133:35

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@gittensory-orb gittensory-orb Bot added the manual-review Gittensor contributor context label Jul 7, 2026
@JSONbored JSONbored force-pushed the codex/fix-added-files-bypassing-ai-review-grounding branch from dacc1e9 to 8599def Compare July 7, 2026 09:10
JSONbored added 2 commits July 7, 2026 02:51
Restoring added-file fetching means added files now share the same
FILE_CONTENT_BUDGET pool as every other status. Add a regression test
that several large added files still degrade to a truncated marker
once the budget is exhausted, instead of over-fetching.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui bbb0195 Commit Preview URL

Branch Preview URL
Jul 07 2026, 09:54 AM

@JSONbored JSONbored force-pushed the codex/fix-added-files-bypassing-ai-review-grounding branch from bbb0195 to 6f8339f Compare July 7, 2026 10:07
@JSONbored JSONbored merged commit effcda8 into main Jul 7, 2026
6 of 8 checks passed
@JSONbored JSONbored deleted the codex/fix-added-files-bypassing-ai-review-grounding branch July 7, 2026 10:14
JSONbored added a commit that referenced this pull request Jul 7, 2026
…iles

fetchFullFileContents unconditionally re-fetched the full post-change body of
every changed file, even a MODIFIED file whose diff hunk already carries every
line of the file (a small file rewritten in one hunk) -- a byte-for-byte
duplicate of what the diff itself already sent to the review prompt.

Adds diffFullyCoversFile: true only when a single hunk starts at line 1 on both
sides AND its unchanged-line count is strictly below git's default 3-line
context window -- fewer than that proves the file truly ends there, since git
would show exactly 3 lines of context if more remained. Deliberately scoped to
status: modified only, so an added file's fetch (restored by #3976) can never
be re-skipped by this check.
JSONbored added a commit that referenced this pull request Jul 7, 2026
…iles (#4046)

* perf(review): skip duplicate full-file grounding fetch for modified files

fetchFullFileContents unconditionally re-fetched the full post-change body of
every changed file, even a MODIFIED file whose diff hunk already carries every
line of the file (a small file rewritten in one hunk) -- a byte-for-byte
duplicate of what the diff itself already sent to the review prompt.

Adds diffFullyCoversFile: true only when a single hunk starts at line 1 on both
sides AND its unchanged-line count is strictly below git's default 3-line
context window -- fewer than that proves the file truly ends there, since git
would show exactly 3 lines of context if more remained. Deliberately scoped to
status: modified only, so an added file's fetch (restored by #3976) can never
be re-skipped by this check.

* test(review): close patch-coverage gaps in diffFullyCoversFile and toGroundingFiles

Codecov flagged 5 uncovered branches on the prior commit: diffFullyCoversFile's
multi-hunk guard, its bare single-line hunk-header shorthand (no comma count),
and its leading-context guard, plus toGroundingFiles' now-optional status field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark codex gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant