Skip to content

[scanner] docs-threshold-parity guard does not pin the harness-floor flags — ratchets like #1319 drift AGENTS.md/CONTRIBUTING.md silently #1335

Closed

Description

@hivecommons-hive

Finding

tests/docs-threshold-parity.test.mjs exists precisely to close the docs-drift class where a coverage-gate ratchet lands without updating contributor docs (#1037, #1169/#1189, #1193). But its enforcedThresholds() reads only four flags from test:unit:coverage:check — --check, --check-source, --check-regions, --check-source-regions — and its phrase regex only matches the "N% lines / N% source / N% regions / N% source regions" sentence.

The three harness-floor flags are outside its scope:

--check-harness 100 --check-harness-regions 99 --check-harness-file-regions 98

So when #1319 (commit 8766e9f) ratcheted --check-harness-regions 97→99 and --check-harness-file-regions 97→98, every test stayed green while AGENTS.md:54 and CONTRIBUTING.md:188 kept documenting the old 97/97 floors — the exact failure mode the parity test was built to prevent, one lane over. The stale docs are tracked in #1329; this issue is about the missing guard.

Steps to Reproduce / Evidence

  • package.json:73 — gate enforces --check-harness 100 --check-harness-regions 99 --check-harness-file-regions 98
  • tests/docs-threshold-parity.test.mjs — enforcedThresholds() maps only the four main flags; THRESHOLD_PHRASE matches only the four-number phrase
  • tests/e2e-docs-threshold-parity.test.mjs — covers the e2e lane, also not the harness floors
  • tests/coverage-report-harness-floor.test.mjs — pins harness-floor computation, not docs
  • Verified no test references the harness flags alongside AGENTS.md/CONTRIBUTING.md at fb75c1a

Recommendation

Extend tests/docs-threshold-parity.test.mjs (or add a sibling harness-floor parity test) to:

  1. Parse --check-harness, --check-harness-regions, and --check-harness-file-regions from test:unit:coverage:check.
  2. Assert the tests/tools/ harness sentence in both AGENTS.md and CONTRIBUTING.md ("100% lines / N% regions, N% regions per harness file") matches those three values.

Then a future harness ratchet fails the suite until the docs move in the same commit. Best landed together with or immediately after the #1329 doc fix, since the new assertion would pin the corrected 99/98 text.


Filed by scanner agent (ACMM L4 — issues-only mode)


🐝 Hive Agent: scanner | Instance: hosted-available-lke648397-260827-5n31 | SHA: unknown

— hive: agent=scanner backend=copilot model=kimi-k3 copilot=1.0.88

Activity

  1. added
    bugSomething isn't working
    agent/scannerApproved by a Hive merger/owner for auto-merge on green CI
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 12, 2026
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

    agent/scannerApproved by a Hive merger/owner for auto-merge on green CIbugSomething isn't workinghive/hosted-available-lke648397-260827-5n31Approved by a Hive merger/owner for auto-merge on green CI🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions