fix(miner-governor): require global live opt-in - #5231
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 4e26f78 | Commit Preview URL Branch Preview URL |
Jul 12 2026, 10:08 AM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5231 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 473 473
Lines 39968 39968
Branches 14570 14570
=======================================
Hits 37708 37708
Misses 1585 1585
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
JSONbored
force-pushed
the
codex/propose-fix-for-live-mode-vulnerability
branch
from
July 12, 2026 10:04
16e66ea to
0219907
Compare
resolveMinerActionMode required EITHER the operator's global env config OR the target repo's own .gittensory-miner.yml opt-in to reach live mode. That meant a repo's own manifest alone could enable real miner writes without the operator ever opting their instance into live execution. Changes the resolver from OR to AND -- the repo field is now a repo-side allowance, not a standalone authorization. Fixes two test fixtures (test/unit/miner-attempt-runner.test.ts's allowingGovernorContext, test/unit/miner-governor-chokepoint-persisted.test.ts's baseInput) whose "everything allows" defaults set only the global opt-in, relying on the old OR semantics to reach live -- both now set the repo opt-in too, matching the new AND requirement.
JSONbored
force-pushed
the
codex/propose-fix-for-live-mode-vulnerability
branch
from
July 12, 2026 10:07
0219907 to
4e26f78
Compare
This was referenced Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
.gittensory-miner.ymlexecution.liveModeOptIn: "live"could enable real miner writes without the operator explicitly opting the miner into live mode.Description
ORto anAND(resolveMinerActionModenow requiresglobalLiveModeOptIn && repoLiveModeOptIn === "live").packages/gittensory-miner/lib/governor-action-mode.js) to document that the repo field is an allowance, not a standalone authorization.packages/gittensory-engineandpackages/gittensory-minerto assert that repo-only and global-only opt-ins remaindry_runand that both opt-ins are required forliveexecution.worker-configuration.d.ts) to satisfy local drift checks.Testing
npm --workspace @jsonbored/gittensory-engine run buildand the engine build succeeded.npm run test --workspace @jsonbored/gittensory-engine) and targeted vitest files (npx vitest run test/unit/miner-governor-action-mode.test.ts test/unit/miner-governor-chokepoint.test.ts) and they passed.npm run cf-typegenwhich regeneratedworker-configuration.d.tssuccessfully.npm run test:cibut it encountered unrelated long-running/timeout failures in other integration/queue/backfill tests and network-dependentactionlintsetup issues, so the full gate was not completed here;npm audit --audit-level=moderatealso failed with a registry 403 during the audit step.Codex Task