Skip to content

fix(manifest): keep freeze override operator-only - #4391

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-repo-manifest-global-freeze-bypass
Jul 9, 2026
Merged

fix(manifest): keep freeze override operator-only#4391
JSONbored merged 1 commit into
mainfrom
codex/fix-repo-manifest-global-freeze-bypass

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • A maintainer-accessible focus-manifest path was recognizing agentGlobalFreezeOverride, which let repo maintainers bypass the operator DB-backed global agent freeze and restore live bot mutations for that repo.
  • The field must remain an operator-only control (YAML/operator config), not a maintainer-editable config-as-code setting, to preserve the global kill-switch semantics.

Description

  • Remove agentGlobalFreezeOverride from the focus-manifest FocusManifestSettings type so it is no longer a recognized repo-config field in packages/gittensory-engine/src/focus-manifest.ts.
  • Stop parsing settings.agentGlobalFreezeOverride from manifests by removing it from the boolean-flag parsing loop in parseSettingsOverride so manifest content can no longer inject the override.
  • Remove the field and its explanatory example from the checked-in manifest examples (.gittensory.yml.example and config/examples/gittensory.full.yml).
  • Update the manifest unit test (test/unit/focus-manifest.test.ts) to assert a manifest-supplied agentGlobalFreezeOverride is ignored and that the DB value remains authoritative.

Testing

  • Ran the focused unit suite: npx vitest run test/unit/focus-manifest.test.ts --no-color and it passed (all tests in that file succeeded).
  • Type-checked the code with npm run typecheck and it succeeded with no errors.
  • Ran repository checks git diff --check, npm run docs:drift-check, and npm run manifest:drift-check which all succeeded.
  • Attempted the full local gate (npm run test:ci) and npm audit --audit-level=moderate but these were blocked by unrelated local environment issues (cf-typegen/wrangler drift and npm registry audit returning 403) so the complete CI gate was not completed here.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 9, 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 ec8ad40 Commit Preview URL

Branch Preview URL
Jul 09 2026, 08:24 AM

@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.96%. Comparing base (ca5576f) to head (ec8ad40).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4391   +/-   ##
=======================================
  Coverage   93.96%   93.96%           
=======================================
  Files         401      401           
  Lines       36869    36869           
  Branches    13480    13480           
=======================================
  Hits        34644    34644           
  Misses       1569     1569           
  Partials      656      656           
Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.08% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit c52fdb9 into main Jul 9, 2026
12 checks passed
@JSONbored
JSONbored deleted the codex/fix-repo-manifest-global-freeze-bypass branch July 9, 2026 08:33
JSONbored added a commit that referenced this pull request Jul 9, 2026
…vate config source (#4410)

#4391 correctly closed the scope leak where a repo's own committed .gittensory.yml
could grant itself an exemption from the operator's fleet-wide freeze, but it also
removed the field from parsing entirely -- leaving raw DB writes as the only way to
set it, even for the operator's own private self-host config (source: "api_record"),
which is a different, already-trusted actor from a repo maintainer.

Restores parsing gated strictly on source === "api_record": a repo-owned manifest
(source: "repo_file") still has the field silently dropped with an operator-only
warning, preserving #4391's fix, while the operator's private container-local yml
can set it again as config-as-code instead of an undocumented DB write.
JSONbored added a commit that referenced this pull request Jul 10, 2026
…4617) (#4682)

check-docs-drift.mjs only guaranteed docs for GITTENSORY_REVIEW_* env
flags and 13 hand-picked *GateMode fields, leaving ~90 other
RepositorySettings fields and the entire FocusManifest config surface
(packages/gittensory-engine) with zero automated documentation check.

Add two new checks: every RepositorySettings field (via a brace-depth
type-literal extractor, not a name-shape regex) and every parseable
FocusManifest leaf field (recursing into nested config types, e.g.
review.visual.production_url) against .gittensory.yml.example. Fields
documented under a renamed/nested yml key are recorded in two small
alias manifests (mirroring the existing GATE_MODE_MANIFEST pattern)
rather than flagged as false positives.

Document the two live-but-undocumented fields the widened checker
found: review.visual.production_url and four sibling review.ai_model.*
overrides, in .gittensory.yml.example and its byte-synced
config/examples/gittensory.full.yml counterpart. agentGlobalFreezeOverride
(the other field named in #4617) is deliberately excluded instead: it
is settable only from the operator's own private config, and
documenting it in the public example would reintroduce the #4391
scope-leak this repo already fixed once (test/unit/focus-manifest.test.ts's
existing SETTINGS_OPERATOR_ONLY_FIELDS list carries the same exclusion).
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