Skip to content

experiments: measure-suggestions still pins the suggestions rule at 336 characters after #3525 lengthened it #3889

Closed

Description

@schlessera

Context

experiments/measure-suggestions.test.ts:128-147 ("lists identical schemas and executes the real handlers with only one description line changed") fails on every run at epic/3855-test-health b71c6e4fe, whose experiment sources match main 0129244ad:

expect(received).toBe(expected)
Expected: 336
Received: 426

The assertion is expect(cost.descriptionChars).toBe(336) at experiments/measure-suggestions.test.ts:144. descriptionChars is the length of the show_block description with the suggestions rule minus its length without it (scripts/measure-suggestions.ts:146). #3525 (41b6221, fixing #3519) rewrote that rule to ask for suggestions before the closing sentence, so the rule is now 90 characters longer. The 336 recorded the #550 measurement's rule text. The test still pins it, and nothing in the test says whether it should follow the shipped description or stay pinned to the measured historical arm.

Found by the test-health push (epic #3855), batch e3855-experiments-01, lens failure-issues. The audit lane does not edit a failing expectation to make it pass, so the test is unchanged.

Resolved by existing records (triage, 2026-11-10)

The pin follows the shipped description. Two records settle it:

  • The test itself asserts that the rule arm is the shipped description: expect(rule[backend].description).toBe(SHOW_BLOCK_DESCRIPTION) (experiments/measure-suggestions.test.ts:132), and suggestionDescription derives both arms from SHOW_BLOCK_DESCRIPTION (scripts/measure-suggestions.ts:20-26). There is no separate historical arm.
  • When the schema changed before, the decision record kept the earlier count and added the new one with its date and cause: "After ui-sdk: suggestions strips unknown fields despite its strict-rejection specification #635's two additionalProperties: false declarations, the same keyless listing on 2026-10-02 adds 866 … the description remains 336 characters" (docs/decisions/design-kit/follow-ups.md:148-151).

The 90-character growth matches #3525's source change: the suggestions: line in packages/ui-sdk/src/tool-contracts/blocks.ts:732 went from 340 to 430 characters of source.

Scope

  • Update experiments/measure-suggestions.test.ts:144 to the current value (426 observed on the epic branch) and re-check :145-146.
  • Add a dated sentence to docs/decisions/design-kit/follow-ups.md, after the 2026-10-02 paragraph (:148-151), recording that after fix(ui-sdk): ask for suggestions before the closing sentence #3525 (2026-11-03) the description line adds 426 characters. Leave the earlier 336 figures as the historical record they are.

Out of scope

  • Changing the shipped show_block description (packages/ui-sdk/src/tool-contracts/blocks.ts).
  • The retains the explicit historical flat schema's suggestions cost case (:148-153), which passes.

Acceptance criteria

  • bun run test ./experiments/measure-suggestions.test.ts passes.
  • The test or its comment says the pinned count belongs to the shipped SHOW_BLOCK_DESCRIPTION.
  • docs/decisions/design-kit/follow-ups.md records the new count with its date and cause; the earlier counts are unchanged.

Verification

Run the experiment file locally and in the experiment tier.

Contract impact

None.

Activity

  1. added
    type: testCoverage, harness or proof work with no behaviour change.
    area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.
    area: ciCI workflows, the gates they run, release scripts, packaging.
    on Nov 10, 2026
  2. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Triage, 2026-11-10, at main 91e54be37: existing records answer the question in Scope. The test asserts that the rule arm is the shipped SHOW_BLOCK_DESCRIPTION (:132). The decision record already handled a schema change by adding the new count with its date and keeping the old one (follow-ups.md:148-151). So the pin follows the shipped description: update :144 and add a dated count to follow-ups.md. #3525's source line grew by exactly 90 characters, which matches 336 to 426. Added area: docs. Priority p2, ready. The experiment tier is a release gate, so this failure blocks the next publish until it is fixed.

  3. added
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    area: docsThe docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    priority: p1Scheduled into the current or next milestone.
    and removed
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    on Nov 10, 2026
  4. added this to the 0.45.0 milestone on Nov 11, 2026
  5. self-assigned this
    on Nov 15, 2026
  6. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-4ee966c6. Branch: test/3889-suggestions-cost.

  7. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Readiness review: the issue is fully scoped, has no parent or blockers, and its cited assertions and measurement helper still match the source. No active implementation PR was reported. The pre-claim collision check found closure overlap across open PRs, with no path collision for the two scoped files. This worker changes only the current description cost pin and its dated historical note; the shipped description and historical flat-schema case stay unchanged.

  8. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Merged in #4034 as 276e2e31d through the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ciCI workflows, the gates they run, release scripts, packaging.area: docsThe docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.priority: p1Scheduled into the current or next milestone.type: testCoverage, harness or proof work with no behaviour change.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions