Skip to content

fix(selfhost): make hard guardrails authoritative - #2974

Merged
JSONbored merged 2 commits into
mainfrom
codex/fix-manual-hold-policy
Jul 4, 2026
Merged

fix(selfhost): make hard guardrails authoritative#2974
JSONbored merged 2 commits into
mainfrom
codex/fix-manual-hold-policy

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • remove legacy focus-manifest blockedPaths as an active manual-review mechanism
  • make settings.hardGuardrailGlobs the single authoritative path-based hold control
  • update prediction, MCP, API schema, dashboard copy, docs, config linting, and regression tests so old blockedPaths input is ignored instead of creating manual holds

Why

The review engine had two path-hold systems: legacy focus-manifest blockedPaths and modern hard guardrails. That drift made repo behavior hard to reason about and caused broad manual-review holds even when operators intended to use only hardGuardrailGlobs.

Validation

  • git diff --check
  • npm run typecheck
  • npm run ui:openapi
  • npm run ui:openapi:check
  • npx vitest run test/unit/focus-manifest.test.ts test/unit/gittensory-focus-manifest.test.ts test/unit/gate-check-policy.test.ts test/unit/predicted-gate.test.ts test/unit/mcp-predict-gate.test.ts test/unit/public-safe-manifest-finding.test.ts test/unit/parity-wire.test.ts test/unit/selfhost-config-lint.test.ts test/integration/api.test.ts test/unit/routes-focus-manifest.test.ts test/unit/focus-manifest-loader.test.ts test/unit/local-branch.test.ts test/unit/pr-body-draft.test.ts test/unit/unified-comment.test.ts test/unit/decision-pack.test.ts test/unit/miner-dashboard-recommendations.test.ts test/unit/repo-policy-readiness.test.ts test/unit/routes-remediation-plan.test.ts test/unit/contributor-issue-draft.test.ts test/unit/policy-sanitizer.test.ts test/unit/queue.test.ts
  • npx vitest run test/unit/focus-manifest.test.ts test/unit/gate-check-policy.test.ts test/unit/predicted-gate.test.ts test/unit/mcp-predict-gate.test.ts test/unit/local-branch.test.ts test/unit/queue.test.ts
  • npx vitest run test/unit/smoke-selfhost-script.test.ts

Notes

  • A full npm run test:coverage run completed the suite body with 413 passed test files, 8,232 passed tests, and coverage above project thresholds, but a local parallel run hit an unrelated test/unit/smoke-selfhost-script.test.ts output race; that smoke test passes in isolation.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 4, 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 5d4b7b1 Commit Preview URL

Branch Preview URL
Jul 04 2026, 08:24 AM

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 4, 2026
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.05%. Comparing base (b5c9145) to head (5d4b7b1).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2974      +/-   ##
==========================================
- Coverage   96.06%   96.05%   -0.02%     
==========================================
  Files         259      259              
  Lines       28665    28638      -27     
  Branches    10433    10419      -14     
==========================================
- Hits        27538    27508      -30     
- Misses        490      493       +3     
  Partials      637      637              
Files with missing lines Coverage Δ
src/config/gittensory-repo-focus-manifest.ts 100.00% <ø> (ø)
src/openapi/schemas.ts 100.00% <ø> (ø)
src/queue/processors.ts 92.74% <ø> (-0.05%) ⬇️
src/review/parity-wire.ts 96.29% <ø> (ø)
src/rules/advisory.ts 97.25% <100.00%> (-0.09%) ⬇️
src/rules/predicted-gate.ts 96.87% <100.00%> (-3.13%) ⬇️
src/selfhost/config-lint.ts 100.00% <100.00%> (ø)
src/services/contributor-issue-draft.ts 97.48% <ø> (ø)
src/services/decision-pack.ts 97.30% <ø> (-0.02%) ⬇️
src/services/miner-dashboard-recommendations.ts 100.00% <100.00%> (ø)
... and 4 more
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 Gittensory is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

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

JSONbored added 2 commits July 4, 2026 01:21
… message

- Apply prettier's canonical formatting to the 3 doc/settings JSX text
  nodes this PR edited (the only CI failure: 4 prettier/prettier errors).
- config-lint.ts: give retired blockedPaths a migration-specific warning
  pointing at settings.hardGuardrailGlobs, instead of the generic
  "unknown top-level field" message.
- Fix a test assertion that checked for the absent-but-unrelated
  manifest_malformed code instead of the actual regression this test
  guards, manifest_blocked_path no longer being emitted.
@JSONbored
JSONbored force-pushed the codex/fix-manual-hold-policy branch from 7694c94 to 5d4b7b1 Compare July 4, 2026 08:22
@JSONbored JSONbored self-assigned this Jul 4, 2026
@JSONbored
JSONbored merged commit f13d95c into main Jul 4, 2026
14 checks passed
@JSONbored
JSONbored deleted the codex/fix-manual-hold-policy branch July 4, 2026 08:28
JSONbored added a commit that referenced this pull request Jul 12, 2026
…ims (#5240)

Two config example files (.gittensory.yml.example, config/examples/gittensory.full.yml)
still described legacy blockedPaths as enforceable ("yields a manifest_blocked_path
finding... enforceable when gate.manifestPolicy: block") -- that mechanism was
retired in #2974 in favor of settings.hardGuardrailGlobs as the single authoritative
path-hold control, and manifest_blocked_path is no longer even a valid finding code.
An operator copying either example would believe they had protection they don't have.

Also fixes a second, related staleness: both example files and two docs pages
(docs.self-hosting-configuration.tsx, docs.tuning.tsx) claimed an omitted/empty
settings.hardGuardrailGlobs means "no path guardrails, never a hidden engine
fallback" -- but #3943 (three days after the comment was written) added
DEFAULT_HARD_GUARDRAIL_GLOBS, a fixed set of built-in invariant guardrails
(config-as-code files, CI workflows/scripts, core engine-decision paths) that
always apply regardless of repo settings. The docs never caught up.
JSONbored added a commit that referenced this pull request Jul 12, 2026
…feature

blockedPaths was fully retired from the FocusManifest parser in #2974
(2026-07-04) -- it produces zero findings and is not enforceable under
any gate.manifestPolicy mode. That retirement commit missed the two
checked-in bootstrap templates (.gittensory.yml.example,
config/examples/gittensory.full.yml), which kept documenting it with
example values and false claims that it feeds guidance/becomes an
enforceable blocker. This is very likely why all 3 live self-hosted
repos still carry a dead blockedPaths: [] key today.

Fixes the false claims in both templates (byte-synced, both edited
identically), fixes the self-hosting docs page's self-contradicting
paragraph, and extends config-templates.test.ts to also run
lintManifestText (the only function with the retired-field check) so
a retired field reintroduced into a shipped template fails CI
automatically going forward -- the previous zero-warnings test used
the lenient parser, which structurally cannot catch this class of bug.

Also removes the dead "manifest_blocked_path" string from
processors.ts's policyCodes Set (no producer has emitted that code
since the retirement).

Refs #5294
JSONbored added a commit that referenced this pull request Jul 12, 2026
…feature (#5304)

* fix(config): stop documenting the retired blockedPaths key as a live feature

blockedPaths was fully retired from the FocusManifest parser in #2974
(2026-07-04) -- it produces zero findings and is not enforceable under
any gate.manifestPolicy mode. That retirement commit missed the two
checked-in bootstrap templates (.gittensory.yml.example,
config/examples/gittensory.full.yml), which kept documenting it with
example values and false claims that it feeds guidance/becomes an
enforceable blocker. This is very likely why all 3 live self-hosted
repos still carry a dead blockedPaths: [] key today.

Fixes the false claims in both templates (byte-synced, both edited
identically), fixes the self-hosting docs page's self-contradicting
paragraph, and extends config-templates.test.ts to also run
lintManifestText (the only function with the retired-field check) so
a retired field reintroduced into a shipped template fails CI
automatically going forward -- the previous zero-warnings test used
the lenient parser, which structurally cannot catch this class of bug.

Also removes the dead "manifest_blocked_path" string from
processors.ts's policyCodes Set (no producer has emitted that code
since the retirement).

Refs #5294

* fix(ui): prettier formatting for the blockedPaths retirement doc fix

CI's ui:lint caught formatting the earlier commit's editor didn't
apply. No content change, whitespace wrapping only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Development

Successfully merging this pull request may close these issues.

1 participant