Skip to content

mw-plugin-test: --allow known-debt ratchet for the plugins gate - #723

Merged
rbuergi merged 2 commits into
mainfrom
feat/plugin-gate-allow
Jul 30, 2026
Merged

rbuergi merged 2 commits into
mainfrom
feat/plugin-gate-allow

Conversation

@rbuergi

@rbuergi rbuergi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The MeshWeaver.Plugins test-repos gate executed for the first time today (Systemorph/MeshWeaver.Plugins#250 fixed its run mechanics — it had died in actions/checkout since being armed) and truthfully reported pre-existing debt: 12 packages failing the install-idempotence pin (tracked in MeshWeaver.Plugins#235), six Tests areas red on main (never executed in CI before), and one in-mesh compile failure. A gate that can only merge red or be silenced gets turned off; this adds the same one-way ratchet the plugins repo already uses for compile-check.allow:

  • --allow <file>: lines of <scope> <check> (install/idempotence on package ids, compile/render/tests on NodeType paths), # comments.
  • A listed failure is tolerated and labeled [known-debt] (package rolls up as DEBT); a new failure fails the run.
  • An entry whose check now passes is STALE and fails the run until removed — the list only shrinks.
  • A skipped check or absent scope is unverifiable: warned, never failed (a skipped Tests area proves nothing either way).
  • Malformed allow lines throw — a typo that silently allowed nothing would defeat the ratchet.

Without --allow behavior is byte-for-byte unchanged. Consumer change (workflow flag + the populated plugin-gate.allow): MeshWeaver.Plugins#250.

🤖 Generated with Claude Code

https://claude.ai/code/session_013H31ey1UdhPk4xXdhVQBw7

…check.allow

The plugins gate ran for the first time on 2026-07-30 (it had died in
checkout since being armed) and truthfully reported the repo's
pre-existing debt: 12 packages failing the install-idempotence pin
(plugins#235) and six Tests areas that shipped red while nothing
executed them. Without a ratchet the gate can only merge red or be
silenced. --allow <file> names the known debt per scope+check
(install/idempotence on packages, compile/render/tests on types):
listed failures are tolerated and labeled, new failures fail, and an
entry whose check passes again is STALE and fails until removed — the
list only shrinks. A skipped check or absent scope is unverifiable and
warned, never failed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H31ey1UdhPk4xXdhVQBw7
Copilot AI review requested due to automatic review settings July 30, 2026 10:55

Copilot AI 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.

Pull request overview

Adds a “known-debt allowlist” ratchet to mw-plugin-test so the MeshWeaver.Plugins gate can be enforced without permanently staying red: listed failures are tolerated as debt, new failures fail the run, and stale allowlist entries (now passing) fail until removed.

Changes:

  • Add --allow <file> CLI option and compute a GateVerdict that classifies failures into new vs known debt, plus stale/unverifiable allow entries.
  • Extend GateReport.WriteSummary(...) to reflect the allowlist verdict (DEBT labeling, stale/unverifiable reporting, and a verdict-driven final line).
  • Introduce GateAllowlist parsing and the verdict evaluation logic.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tools/MeshWeaver.PluginTester/Program.cs Adds --allow argument parsing and applies the allowlist verdict to determine exit code and summary output.
tools/MeshWeaver.PluginTester/GateReport.cs Updates summary writer to support allowlist-aware labeling and final verdict output.
tools/MeshWeaver.PluginTester/GateAllowlist.cs New allowlist format/parser and verdict evaluation (new failures vs debt, stale/unverifiable entries).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +38
case "--allow" when i + 1 < args.Length:
allowlist = GateAllowlist.Load(args[++i]);
allowApplied = true;
break;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 317bd42: a value-taking option as the last argument now errors with "requires a value" (exit 2) — applied to --compile-timeout/--render-timeout too, which had the same fall-through.

Comment on lines +28 to +33
/// <summary>Parses the allow file, throwing on a malformed line — a typo that silently
/// allowed nothing (or everything) would defeat the ratchet.</summary>
public static GateAllowlist Parse(IEnumerable<string> lines)
{
var entries = new List<AllowEntry>();
var number = 0;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added GateAllowlistTest (15 cases) in 317bd42: parse incl. malformed-line throw, known/new split, the stale rule (exact scope only), the unverifiable escape (absent scope, skipped tests, idempotence behind a failed install), and the single-verdict summary.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

   12 files  ±0     12 suites  ±0   3m 21s ⏱️ -8s
  977 tests ±0    973 ✅ ±0  4 💤 ±0  0 ❌ ±0 
1 041 runs  ±0  1 037 ✅ ±0  4 💤 ±0  0 ❌ ±0 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

959 tests  ±0   953 ✅ ±0   4m 49s ⏱️ + 1m 9s
  5 suites ±0     6 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

1 182 tests  +15   1 181 ✅ +15   5m 50s ⏱️ -4s
   12 suites ± 0       1 💤 ± 0 
   12 files   ± 0       0 ❌ ± 0 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

1 131 tests  ±0   1 028 ✅ ±0   5m 12s ⏱️ -12s
   10 suites ±0     103 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 100 tests  ±0   1 912 ✅ ±0   4m 38s ⏱️ -14s
   12 suites ±0     188 💤 ±0 
   12 files   ±0       0 ❌ ±0 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 207 tests  +421   1 206 ✅ +421   6m 17s ⏱️ + 3m 28s
   10 suites +  1       1 💤 +  1 
   10 files   +  1       0 ❌  -   1 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   61 files  +  1     61 suites  +1   30m 9s ⏱️ + 3m 58s
7 556 tests +436  7 253 ✅ +436  303 💤 +1  0 ❌  - 1 
7 620 runs  +436  7 317 ✅ +436  303 💤 +1  0 ❌  - 1 

Results for commit 317bd42. ± Comparison against base commit 9d2ee63.

♻️ This comment has been updated with latest results.

…ned by tests

--allow (and the timeout flags) as the last argument now say 'requires a
value' instead of the misleading 'Unknown argument'. GateAllowlistTest
pins parse (comments, case, malformed-line throw), the known/new split,
the stale rule (a passing entry fails until removed, exact scope only),
the unverifiable escape (absent scope, skipped tests, idempotence behind
a failed install), and the one-verdict summary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H31ey1UdhPk4xXdhVQBw7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants