Skip to content

queue: maybeApplyManifestPolicyGate's doc comments say 'three' enforceable policy findings, code has two #9295

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

maybeApplyManifestPolicyGate in src/queue/processors.ts has two comments claiming it "pushes
ONLY the three enforceable policy findings onto the advisory":

  • The function's JSDoc, ~line 9318-9319.
  • An inline comment inside the function body, ~line 9341-9342.

The actual code only filters for two codes:

const policyCodes = new Set([
  "manifest_linked_issue_required",
  "manifest_missing_tests",
]);

and src/rules/advisory.ts's resolveConfiguredGateMode only treats exactly these two
manifest_* codes as blockable under manifestPolicyGateMode — confirming two is the current,
correct count, not three.

Verified via git history: policyCodes originally held three entries —
"manifest_blocked_path", "manifest_linked_issue_required", "manifest_missing_tests"
matching "three" at the time. Commit 329af5a9 ("fix(config): stop documenting the retired
blockedPaths key as a live feature, #5304") correctly removed the dead "manifest_blocked_path"
string (it hadn't been emitted since the blockedPaths field was retired) but never updated the
two "three enforceable policy findings" comments that referenced the old count.

This is a pure comment-text mismatch with zero logic change — the same class of drift #5304 itself
fixed for the equivalent stale claims in .gittensory.yml.example and
config/examples/gittensory.full.yml, just missed in this one function's own doc comments.

Requirements

  • Update both occurrences of "three enforceable policy findings" in
    maybeApplyManifestPolicyGate (the JSDoc and the inline comment) to say "two", matching the
    actual policyCodes set.
  • Do not change policyCodes itself or any other logic in the function — this is a
    comment-only fix.
  • Do not touch .gittensory.yml.example or config/examples/gittensory.full.ymlfix(config): stop documenting the retired blockedPaths key as a live feature #5304 already
    fixed those.

Deliverables

  • maybeApplyManifestPolicyGate's JSDoc comment updated from "three" to "two enforceable
    policy findings".
  • The matching inline comment inside the function body updated identically.
  • A grep across src/queue/processors.ts for the string "three enforceable" confirms zero
    remaining occurrences after the fix (state this check was performed in the PR description).

All deliverables are required in this single PR.

Test Coverage Requirements

This is a comment-only change with no executable logic modified, so no new test is required. State
explicitly in the PR description that no test changes are needed because no behavior changed —
do not add a placeholder/stub test.

Expected Outcome

maybeApplyManifestPolicyGate's doc comments accurately describe the current two-code
policyCodes set, matching what src/rules/advisory.ts's resolveConfiguredGateMode actually
enforces, instead of referencing a stale three-code count from before manifest_blocked_path was
retired.

Links & Resources

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions