Skip to content

fix(rubric): collapse platform factors into single 2-point factor#1346

Merged
stack72 merged 1 commit into
mainfrom
298-collapse-platform-rubric-factors
May 8, 2026
Merged

fix(rubric): collapse platform factors into single 2-point factor#1346
stack72 merged 1 commit into
mainfrom
298-collapse-platform-rubric-factors

Conversation

@stack72
Copy link
Copy Markdown
Contributor

@stack72 stack72 commented May 8, 2026

Summary

  • Mirrors swamp-club#509 — collapse platforms-one and platforms-two into a single platforms factor worth 2 points
  • A single-platform manifest now earns full credit — platform breadth is not a quality proxy when the upstream constrains it
  • Factor count drops from 10 to 9; max stays at 12
  • CLI and registry now produce identical scoring

Test plan

  • All 66 unit tests pass (deno test src/domain/extensions/extension_rubric_scorer_test.ts)
  • Parity tests updated to match swamp-club server scorer
  • Integration test updated (single-platform manifest no longer fails platforms-two)
  • Run integration/extension_quality_test.ts in a full dev environment

🤖 Generated with Claude Code

Mirrors swamp-club#509 — collapse platforms-one and platforms-two into a
single `platforms` factor worth 2 points. A single-platform manifest now
earns full credit. Factor count drops from 10 to 9; max stays at 12.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Adversarial Review

Critical / High

None.

Medium

  1. src/domain/extensions/extension_rubric_scorer.ts:351 — tautological condition

    manifest.platforms.length === 0 || manifest.platforms.length >= 1,

    This is always true for any array — .length is either 0 (first branch) or ≥1 (second branch). There is no possible input that causes the platforms factor to be "missing".

    This appears to be intentional per the PR description ("single-platform manifest now earns full credit"), and the old platforms-one factor had the same tautology, so behavior is preserved. But the condition is misleading — a reader will wonder what input could fail it. Consider simplifying to just true to make the intent explicit, or adding a brief comment that the factor is always earned when platforms is a valid array (i.e., the factor gates on the field existing, not its value).

    Not blocking because behavior is correct and intentional.

Low

None.

Verdict

PASS — Straightforward collapse of two factors into one. Arithmetic is correct (9 factors, 12 max points preserved). Tests are updated consistently across unit and integration layers. The only concern is a cosmetic tautology in the boolean condition.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Code Review

Blocking Issues

None.

Suggestions

  1. Tautological condition (extension_rubric_scorer.ts:351): The guard manifest.platforms.length === 0 || manifest.platforms.length >= 1 is always true — every array satisfies one of those branches. This was inherited from the old platforms-one factor, so it's not a regression, but it could be simplified to just true to make the intent ("always award these points") self-evident. Minor readability nit, not blocking.

DDD: Changes are well-contained in the domain layer (src/domain/extensions/). composeScore is pure domain logic operating on value objects — no boundary violations.

Tests: Thorough — 66 unit tests updated, parity tests aligned, integration test updated. Factor count (9) and max points (12) are verified.

CLAUDE.md compliance: License header present, tests adjacent to source, no internal libswamp imports from outside the boundary, comment in the doc block updated to reflect the new factor count.

Clean, well-scoped change.

@stack72 stack72 merged commit 8d6b185 into main May 8, 2026
11 checks passed
@stack72 stack72 deleted the 298-collapse-platform-rubric-factors branch May 8, 2026 13:12
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.

1 participant