Skip to content

e2e-dls: assert the contract #218 left behind, not the one it replaced - #226

Merged
gilesknap merged 1 commit into
mainfrom
e2e/withheld-config-contract
Aug 24, 2026
Merged

gilesknap merged 1 commit into
mainfrom
e2e/withheld-config-contract

Conversation

@gilesknap

Copy link
Copy Markdown
Member

Part of #225

test_debug_config_emits_a_configuration_for_a_seat_that_can_attach asserted
capable seat ⇒ configuration emitted. Its own docstring called the capability
gate "one of four prerequisites the debugpy flavour is withdrawn on" — #218
added a fifth, and the test was not told.

Since that fix, a run whose injection leaves no live server withdraws the
flavour, keeps whatever launch.json already held, and exits non-zero. That is
the point of #218: authoring a port nothing answers is worse than changing
nothing. The gdb injection into this fixture refuses intermittently (#225),
upstream of anything podbench decides and while capreport measures the attach
as available on the same seat and the same pid — so the old assertion turned an
upstream flake into a red job. It did so twice: once on the branch, once on the
0.9.0 tag.

What it asserts now

Two acceptable outcomes, both pinned, because asserting either alone is wrong —
the happy path alone goes red on a flake, the sad path alone lets a real
withdrawal pass unnoticed.

  • No withholding sentence: exit 0 and a configuration on stdout, as before.
  • Withholding sentence present: the port named in the seat's own refusal
    must not appear in the emitted document.

That second check is deliberately not "stdout is empty". Another candidate may
legitimately have emitted a configuration in the same run, so the port is read
back out of the refusal sentence and checked against what was emitted — which
is the thing #218 actually forbids, rather than a proxy for it.

The marker is spelled out rather than imported from vscode.WITHHELD_NOTE:
these tests read what a seat printed, and the seat is a different build of
podbench from the one running them.

How to review

just check. The e2e suite is opt-in and runs in CI; this changes no
production code, so the unit suite is unaffected (1867 passed).

Worth knowing: this does not fix #225. The gdb DoAttach flake is still
there and still worth diagnosing — that issue carries the hostNetwork-contention
hypothesis to eliminate first, and a cheap suggestion (capture the dlerror()
the batch script already calls) that would turn the next occurrence into
evidence instead of another guess.

test_debug_config_emits_a_configuration_for_a_seat_that_can_attach
asserted that a seat which can attach always gets a configuration. Its
own docstring named the capability gate as "one of four prerequisites
the debugpy flavour is withdrawn on"; #218 added a fifth, and this test
was not told.

Since that fix a run whose injection leaves no live server withdraws the
flavour, keeps whatever launch.json already held, and exits non-zero -
deliberately, because authoring a port nothing answers is the defect
#218 was filed for. The gdb injection into this fixture refuses
intermittently (#225), upstream of anything podbench decides and while
capreport measures the attach as available on the same seat and pid. So
the old assertion turned an upstream flake into a red job, and did it
twice: once on the branch and once on the 0.9.0 tag.

There are exactly two acceptable outcomes now, and asserting either one
alone is wrong - the happy path alone fails on a flake, the sad path
alone lets a real withdrawal pass unnoticed. Both are pinned. The
withheld branch checks the one thing #218 forbids rather than merely
that nothing was emitted: the port named in the seat's own refusal must
not appear in the emitted document. Read back out of that sentence
instead of assuming stdout is empty, because another candidate may
legitimately have emitted a configuration in the same run.

Part of #225

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3329bc80-7d77-4999-a94a-36a12f5b1123

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gilesknap
gilesknap merged commit cf4fcd2 into main Aug 24, 2026
30 checks passed
@gilesknap
gilesknap deleted the e2e/withheld-config-contract branch August 24, 2026 15:16
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.

e2e-dls: the gdb injection into the DLS-IOC fixture fails intermittently, and now fails the run instead of being papered over

1 participant