Skip to content

fix(engine): derive the screenshotTableGate invalid-action warning from VALID_ACTIONS - #10105

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9996
Jul 31, 2026
Merged

fix(engine): derive the screenshotTableGate invalid-action warning from VALID_ACTIONS#10105
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9996

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(engine): derive the screenshotTableGate invalid-action warning from VALID_ACTIONS

The warning still named only close/advisory after #9964 added the block tier, so
an operator who mistyped the action was pointed at a vocabulary that no longer
matched what the gate actually accepts. Interpolate VALID_ACTIONS and the
resolved default instead of restating them as a literal, mirroring
normalizeSelfLoopAutonomy's derived-vocabulary pattern in ams-policy-spec.ts.

Closes #9996

…om VALID_ACTIONS

The warning still named only close/advisory after JSONbored#9964 added the block tier, so
an operator who mistyped the action was pointed at a vocabulary that no longer
matched what the gate actually accepts. Interpolate VALID_ACTIONS and the
resolved default instead of restating them as a literal, mirroring
normalizeSelfLoopAutonomy's derived-vocabulary pattern in ams-policy-spec.ts.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 31, 2026 07:11
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb

loopover-orb Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-31 07:30:33 UTC

4 files · 1 AI reviewer · no blockers · readiness 93/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a narrow, correctly-targeted fix: the invalid-action warning in normalizeScreenshotTableGateConfig now interpolates VALID_ACTIONS and DEFAULT_SCREENSHOT_TABLE_GATE.action instead of a stale hardcoded 'close/advisory' string, so it accurately lists all three tiers (close, block, advisory) after #9964 added 'block'. The change is minimal, correctly derives the message from the same source of truth used by isScreenshotTableGateAction, and is backed by matching tests in three separate suites verifying the warning mentions 'block'. Closes the linked issue #9996 as described.

Nits — 2 non-blocking
  • The same test cases (invalid action mentions 'block', absent action no warning, valid block resolves cleanly) are duplicated verbatim across packages/loopover-engine/test/screenshot-table-gate.test.ts, test/unit/screenshot-table-gate-engine.test.ts, and test/unit/screenshot-table-gate.test.ts — worth a comment noting this mirrors the existing dual-suite convention rather than being unintentional duplication.
  • Consider whether the feat(review): wire bot-generated visual captures into screenshotTableGate #4110 issue reference in the warning string (screenshot-table-gate.ts:87) still reads correctly now that the message format changed from a fixed 'close or advisory' phrase to an interpolated list — worth a quick re-read to confirm the sentence still flows grammatically with three items.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9996
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ⚠️ 20/25 Preflight is ready, but the PR body does not name the validation run.
Contributor workload ✅ 10/10 Author activity: 98 registered-repo PR(s), 67 merged, 3 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 98 PR(s), 3 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The warning message is now derived from VALID_ACTIONS.join(", ") and DEFAULT_SCREENSHOT_TABLE_GATE.action instead of a hardcoded literal, preserving the #4110 note, and the PR adds the required regression tests at packages/loopover-engine/test/screenshot-table-gate.test.ts plus root-suite coverage covering the invalid-action, absent-action, and valid-block-action paths as specified.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 98 PR(s), 3 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add validation command/output.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

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

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.95%. Comparing base (067b15a) to head (8ecc1b0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10105       +/-   ##
===========================================
+ Coverage   79.75%   91.95%   +12.19%     
===========================================
  Files         282      930      +648     
  Lines       58685   113891    +55206     
  Branches     6878    27492    +20614     
===========================================
+ Hits        46804   104726    +57922     
+ Misses      11593     7863     -3730     
- Partials      288     1302     +1014     
Flag Coverage Δ
backend 95.66% <100.00%> (?)
engine 72.72% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...oopover-engine/src/review/screenshot-table-gate.ts 73.32% <100.00%> (+28.80%) ⬆️

... and 780 files with indirect coverage changes

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

engine(gate): the screenshotTableGate action warning still names only close/advisory after the block tier shipped

1 participant