Skip to content

isMarketplaceBrowsePattern excludes install-local by bare startsWith, so an adjacent spelling is claimed by neither derived flag #8467

Closed as not planned

Description

@os-zhuang

Observation, filed while implementing #8388 (PR #8466). Dormant today — no route in the repo has the shape below — so it is recorded rather than fixed, and #8388 deliberately did not touch it because changing it is a behaviour change to #8356's key.

packages/cloud-connection/src/runtime-config-plugin.ts now derives two flags from the same route ledger with two predicates that share one prefix constant, but test membership at different strictness:

// browse (#8356): bare startsWith for the exclusion
function isMarketplaceBrowsePattern(pattern: string): boolean {
    if (pattern.startsWith(MARKETPLACE_INSTALL_LOCAL_PREFIX)) return false;
    ...
}

// install-local (#8388): segment boundary for the inclusion
function isMarketplaceInstallLocalPattern(pattern: string): boolean {
    if (!pattern.startsWith(MARKETPLACE_INSTALL_LOCAL_PREFIX)) return false;
    const rest = pattern.slice(MARKETPLACE_INSTALL_LOCAL_PREFIX.length);
    return rest === '' || rest.startsWith('/');
}

So a hypothetical /api/v1/marketplace/install-locality/... route is subtracted from browse (it matches the bare startsWith) and not counted as install-local (it fails the segment boundary). It would be claimed by neither flag.

Why it was left alone

Both halves fail in the under-reporting direction, which is the direction this whole family of fixes chose deliberately: a runtime never announces a capability whose route 404s, it only ever stays quiet about one it has. And the resolveFeatures seam still lets a host declare anything it knows it serves. So there is no reachable defect here today.

Tightening browse's exclusion to the same segment boundary would make the two predicates a clean partition of the namespace, but it would also newly count such a path as browse — a behaviour change to the key #8356 owns, which #8388's scope did not cover.

Suggested disposition when triaged

Either tighten isMarketplaceBrowsePattern's exclusion to the segment boundary (making the partition exact, with a pin for the adjacent spelling in runtime-config-marketplace-derivation.test.ts), or record the asymmetry as intentional and leave it. The current code comments state it as deliberate, so "leave it" is a legitimate outcome.

The install-local side is already pinned in both directions by packages/cloud-connection/src/runtime-config-install-local-derivation.test.ts ("an adjacent spelling is not the install-local namespace"). The browse side has no such pin.

Backlink: #8388, #8356.


Generated by Claude Code

Activity

  1. added
    domain:cliRetired 2026-10-22, alias of domain:server (cli surface); in-flight cards keep it until they land
    on Aug 13, 2026
  2. hotlong commented on Aug 13, 2026

    @hotlong
    Contributor

    Triage (first-touch grade): closed not planned. Reasons: ① no reachable defect — no route in the repo has the adjacent shape, and both halves fail in the under-reporting direction, which this family chose deliberately (a runtime never announces a capability it cannot serve; resolveFeatures remains the operator override); ② the card's own second disposition — "record the asymmetry as intentional and leave it" — is already satisfied: the code comments state the asymmetry as deliberate; ③ tightening the browse exclusion is a behaviour change to #8356's key with zero measured pull, which startup scope discipline defers. Reopen condition, named: if a real install-local*-adjacent route ever enters the ledger, or #8356's key changes hands, re-grade — the missing browse-side pin described here becomes the first deliverable then. Closure listed in this round's report for maintainer veto.

    本评论来自分诊座位 Routine。


    Generated by Claude Code

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

    domain:cliRetired 2026-10-22, alias of domain:server (cli surface); in-flight cards keep it until they landfinding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions