Skip to content

fix(compliance): stop silent RC fallback for lines without a stable build - #7679

Merged
garvitkaushik-123 merged 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/7356-hosted-compliance-rc-fallback
Sep 24, 2026
Merged

garvitkaushik-123 merged 1 commit into
adcontextprotocol:mainfrom
garvitkaushik-123:fix/7356-hosted-compliance-rc-fallback

Conversation

@garvitkaushik-123

@garvitkaushik-123 garvitkaushik-123 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

latestBadgeEligibleComplianceVersionForLine() silently fell back to the latest RC build when a non-default compliance line (e.g. 3.2) had no stable release yet. Any caller resolving a bare line alias for that line, whether through badge-eligibility checks or an explicit compliance_target: "3.2", got a prerelease back with no signal that it wasn't a stable release.

This was diagnosed by @bokelley in #7356. The original report (an explicit compliance_target: "3.1.20" resolving to 3.2.0-rc.1) doesn't reproduce against current code, since an exact version string bypasses this function entirely. But the triage identified the underlying fallback as a real, separate risk, and proposed this exact fix:

The fix — throw loudly instead of silently promoting to RC for a non-default line with no stable build — is non-breaking for current callers on the 3.0 and 3.1 lines.

That triage also flagged a focused follow-up issue as a planned next step; none has been filed yet, so this PR does the fix directly against #7356 rather than waiting on a second issue.

Change

  • Non-default lines now propagate the stable-lookup error directly instead of trying an RC fallback.
  • The default line (3.0) keeps its existing stable -> rc -> beta fallback chain, unchanged.

Test plan

  • Added server/tests/unit/hosted-compliance-version.test.ts:
    • 3.1 still resolves to its latest stable build (3.1.20)
    • 3.0 still resolves to the module's default version
    • 3.2 (currently RC-only, no stable release) now throws instead of silently returning a prerelease
  • Ran vitest run --config server/vitest.config.ts server/tests/unit/ server/tests/integration/ -t compliance: 1 failed / 164 passed / 757 skipped. Confirmed the 1 failure (sdk_version mismatch in compliance-publication.test.ts) is pre-existing and identical on upstream/main without this change (stale @adcp/sdk in local node_modules), not caused by this diff.
  • npx tsc --project server/tsconfig.json --noEmit: no new errors introduced by this file.

Fixes #7356

…uild

latestBadgeEligibleComplianceVersionForLine() silently returned the
latest RC when a non-default line (e.g. "3.2") had no stable build yet,
so a bare line alias or an explicit compliance_target for that line
would resolve to a prerelease indistinguishable from a stable release.
Callers (badge eligibility checks, explicit compliance_target
resolution) had no way to tell the difference.

Throw loudly for non-default lines instead. The default line (3.0)
keeps its existing stable -> rc -> beta fallback chain unchanged.

Diagnosed by bokelley on adcontextprotocol#7356 as a real latent risk separate from
that issue's original (unreproducible) report, with this exact fix
proposed and flagged as non-breaking for current callers on 3.0 and
3.1.

Fixes adcontextprotocol#7356
@garvitkaushik-123
garvitkaushik-123 force-pushed the fix/7356-hosted-compliance-rc-fallback branch from 19de21e to 0e1580e Compare September 24, 2026 16:49

@aao-secretariat aao-secretariat 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.

Ladon verdict: Request changes

Request changes — 2 blocking finding(s)

The source fix in hosted-compliance-version.ts is correct and well-scoped (non-default lines fail-closed rather than silently promoting to an RC; the default 3.0 line is unchanged), and no changeset is required (server-only, no protocol surface). However, the accompanying test file ships red.

Blocking findings

  • server/tests/unit/hosted-compliance-version.test.ts:9 — Hardcoded drifted release-state value: asserts 3.1→3.1.20 but the published ceiling is now 3.1.23. Test fails against current published state.
  • server/tests/unit/hosted-compliance-version.test.ts:22 — Regression guard expects a "No npm-published" throw for 3.2, but 3.2.0 is now published, so the actual "No checked-in cache" throw fails the regex. The PR's own validation ships red.

Resolve both test assertions to match current published release state before merge.

Blocking findings

  • server/tests/unit/hosted-compliance-version.test.ts:9 — Hardcoded drifted release-state value (asserts 3.1→3.1.20 but published ceiling is 3.1.23); test fails.
  • server/tests/unit/hosted-compliance-version.test.ts:22 — Regression guard expects 'No npm-published' throw for 3.2, but 3.2.0 is now published so the actual 'No checked-in cache' throw fails the regex; PR validation ships red.

@aao-secretariat
aao-secretariat Bot dismissed their stale review September 24, 2026 16:54

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Approve

Approve — clean pass, prior blockers resolved.

This is a subsequent review of a server-only change (server/src/services/hosted-compliance-version.ts + test). The prior run was request-changes; both prior blocking findings on the test file are now resolved:

  • Test line 9 is now regex-based (correctly resolves 3.1.23) instead of the drifted 3.1.20 pin.
  • The 3.2 case correctly throws "No npm-published compliance version is registered for 3.2" since no stable 3.2.x exists in published_versions (only rc/beta; 3.2.0 is package_only).

The source fix is a fail-closed improvement: non-default lines throw rather than silently promoting to an RC, while the default 3.0 line retains its stable→rc→beta fallback. Server-only, no protocol surface (static/schemas/source/**, docs/reference, dist artifacts) touched, so no changeset required.

No current critical/high/medium findings. Not high-risk, no gated paths, no author-team gate, review_decision not applicable. None of rows 1–8 fire → row 9 approve. Net improvement over the prior run.

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.

evaluate_agent_quality silently resolves stable version request to a pre-release tag

1 participant