fix(engine): remove the dead AMS_POLICY_SPEC_FILENAMES discovery constant - #9004
fix(engine): remove the dead AMS_POLICY_SPEC_FILENAMES discovery constant#9004shin-core wants to merge 1 commit into
Conversation
…tant AMS_POLICY_SPEC_FILENAMES claimed a documented 4-path first-match-wins discovery order "mirroring MINER_GOAL_SPEC_FILENAMES", but the real consumer resolves AMS policy from a single operator-config-dir filename and never imported the constant -- so it was dead (referenced only by its own declaration, the barrel export, and tests asserting the literal array) and its comment misdescribed the actual behavior. AMS policy is deliberately operator-local, not repo-discovered, so the misleading constant is removed rather than wiring a discovery chain that the resolver is not meant to have. Delete the constant and its doc comment, drop the barrel export, and remove the two barrel tests' assertions of it. No other code referenced it. Closes JSONbored#8863
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-26 15:57:52 UTC
Review summary Nits — 4 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver 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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
What & why
Closes #8863.
packages/loopover-engine/src/ams-policy-spec.tsexportedAMS_POLICY_SPEC_FILENAMES, claiming adocumented 4-path first-match-wins discovery order "mirroring
MINER_GOAL_SPEC_FILENAMES". But thereal consumer,
packages/loopover-miner/lib/ams-policy.ts, resolves AMS policy from a singleoperator-config-dir filename (
.loopover-ams.yml), never imports the constant, and has no fallbackchain — so an operator using
.github/or.jsonvariants silently got defaults. The constant wasdead and its comment misdescribed real behavior.
Choice (issue option a)
AMS policy is deliberately operator-local, not repo-discovered (the resolver reads only the
operator config dir), so I removed the misleading constant rather than wiring a repo-discovery chain
the resolver is not meant to have.
Change
AMS_POLICY_SPEC_FILENAMESand its doc comment fromams-policy-spec.ts.packages/loopover-engine/src/index.ts.Confirmation
Grep-verified the constant had no other references anywhere in the tree (only its declaration,
the barrel export, and the two removed test assertions).
ams-policy.tsis unchanged. The enginetypecheck and both barrel test suites pass with the constant removed.