fix(miner): keep AMS policy operator-local#5351
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 1718d28 | Commit Preview URL Branch Preview URL |
Jul 12 2026, 02:50 PM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-12 21:48:08 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5351 +/- ##
==========================================
- Coverage 94.71% 94.71% -0.01%
==========================================
Files 555 555
Lines 44526 44508 -18
Branches 14664 14664
==========================================
- Hits 42172 42154 -18
Misses 1619 1619
Partials 735 735
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
1718d28 to
7388bc4
Compare
Motivation
maxIterations,maxTurnsPerIteration,slopThreshold,submissionMode) that can cause excessive agent invocation or operator resource/quota exhaustion..gittensory-ams.yml; this change enforces that operator policy remains local-only and defaults are used otherwise.Description
.gittensory-ams.ymlas a fallback and instead only read the operator's local file or return safe defaults; this removes the repo-sourced policy path fromresolveAmsPolicyinpackages/gittensory-miner/lib/ams-policy.js."repo"source and tighten the options shape inpackages/gittensory-miner/lib/ams-policy.d.ts..gittensory-ams.yml.exampleandpackages/gittensory-engine/src/ams-policy-spec.tsexplanations to state the operator-local trust boundary clearly.test/unit/miner-ams-policy.test.ts) to cover the regression that target-repo policy fetch hooks are never called and to preserve existing local-file behavior.Testing
npx vitest run test/unit/miner-ams-policy.test.ts test/unit/miner-attempt-cli.test.ts test/unit/miner-loop-cli.test.ts, and all targeted tests passed.npm run build:minerandnpm run test:miner-packcompleted successfully.npm run test:ciwas attempted but failed due to pre-existing environment/drift issues (staleworker-configuration.d.ts/cf-typegencheck) and unrelated typecheck errors in other files, not caused by these changes.npm run typecheckreported unrelated type errors elsewhere in the repo;npm audit --audit-level=moderatewas blocked by the npm registry returning403 Forbiddenduring this run.Codex Task