Skip to content

fix(planning): read Cloudflare's plain-text no-connector answer as a free link - #10948

Merged
kyle-sexton merged 4 commits into
mainfrom
fix/8607-plain-text-no-connector
Oct 29, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
fix/8607-plain-text-no-connector

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Refs: #8607

Summary

With no connector running, the shared interview's named tunnel never started: every ensure-running fell back to a quick tunnel with "answers HTTP 530, which does not show the link free". The lease's no-connector check (#10832) matched only the HTML page a browser gets, and Cloudflare answers a non-browser client with plain text instead.

Fix

  • share.py's NO_CONNECTOR matches both wordings, case-insensitively: Error 1033 (the HTML page, tags stripped) and error code: 1033 (the text/plain body). It still never matches a bare 1033, such as errorCode: 1033 in the page's script.
  • The README lease table and the unreleased feat(planning): stable guest link for shared interview sessions #8607 changelog fragment name both forms.

Verification

  • Live, 2026-10-29: share.sh ensure-running against planning-interview.melodicsoftware.com on the merged feat(planning): lease and route the shared interview's named tunnel #10832 code fell back to a quick tunnel on both starts. curl on the probe route returned HTTP 530, content-type: text/plain, body error code: 1033 (17 bytes). share.no_connector(530, <that body>) returns True with this fix.
  • New test test_the_plain_text_no_connector_answer_is_free fails before the fix and passes after; a plain-text error code: 1016 case stays held. test_share: 113 tests pass. Ruff (pinned wrapper) clean.

Remaining for #8607

  • A live start through the merged code that serves https://planning-interview.melodicsoftware.com (HTTP 200, "tunnel": "named"); it waits on this fix.
  • The two token files on the owner's other machines (only this desktop's WSL has them); how they are delivered is an open owner decision.
  • Closing feat(planning): stable guest link for shared interview sessions #8607 with the live evidence.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 29, 2026 09:13
…free link

Cloudflare answers a non-browser client with text/plain "error code: 1033"
(17 bytes, read from the stable link on 2026-10-29), not the HTML page whose
"Error 1033" the lease matched. Every named start therefore fell back to a quick
tunnel with "answers HTTP 530, which does not show the link free". The matcher
now takes both wordings, case-insensitive, and still never a bare 1033.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 29, 2026 13:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T13:22:33.019836Z 0a3dff3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 85943e29ca335ff1cdd550276d0701ecc04a79a4: no file of this pull request changed since the review of 814554c.

No findings.

I read the diff and the surrounding no_connector and link_holder code in plugins/planning/shared/share.py. I did not run the tests; the "113 tests pass" and live-curl results are the author's claims and unverified by me.

  • Regex: \berror(?: code)?:? 1033\b with IGNORECASE matches Error 1033 (HTML text after tag stripping) and error code: 1033 (plain text). It still doesn't match the bare errorCode: 1033 from the page script. After error the pattern needs either code or : or a space, and errorCode has none of those, so the existing "1033 only outside the Error heading" test case stays held.
  • Status gate: no_connector still requires status == 530, so a 1033 text with any other status stays held. A plain-text 1016 is held too, and the new tests cover both.
  • Looser match: The wider pattern could in theory accept an origin's own 530 body containing "error: 1033". That is implausible for the interview server's probe route, and the failure mode is only a quick-tunnel fallback, not a split link.
  • Docs: The README lease table and the changelog fragment match the new behavior.
  • Closing issues: None. The PR says "Refs feat(planning): stable guest link for shared interview sessions #8607", so there are no acceptance criteria to check.
  • Manifests: The diff changes no plugin manifests.
  • Spend: None.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 85943e29ca335ff1cdd550276d0701ecc04a79a4: no file of this pull request changed since the review of 814554c.

No security issues found. critical-findings: 0

I read the whole diff (4 files) and the surrounding code in plugins/planning/shared/share.py. None of the changed files is a trust control.

  • What changed: NO_CONNECTOR (share.py:306) now also accepts Cloudflare's plain-text body error code: 1033, case-insensitively. The README table, the changelog fragment and one new test and case in test_share.py follow.
  • What still gates the match: no_connector (share.py:309-312) still requires HTTP 530. It still strips tags before matching and reads at most 64 KiB (share.py:324). A bare 1033, or errorCode: 1033 in a script, does not match, because the code alternative needs a space. The new tests cover plain-text error code: 1016 and the script-only 1033 case.
  • Possible spoof: the only way to get a "free" answer is a 530 whose body says error 1033 in some casing. A party who controls the origin behind the tunnel hostname could craft that body. That party already controls the link, so it gains nothing new. Any other answer, or a failure to ask, still counts as held and runs a quick tunnel (fail closed).
  • Consequence of a wrong "free": the machine starts a replica of the named tunnel. That splits guests of the link and carries no secret or privilege. The API-token checks after start (second connector, rewritten route) are unchanged.
  • Inputs: the hostname is validated by tunnel.hostname_problem. The probe path uses a random nonce. Nothing in the diff changes how tokens, files or processes are handled.

Spend: none. The PR adds no billed resource and no extra lane runs.

@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 0a3dff34f84e36c194f1adfdb3e3dc7600d0cedc. What it wrote, as data:

Summary: This PR refs #8607 (a guest link that survives a restart) instead of closing it, so it is judged as a partial delivery. The code part is sound and within the issue's scope. The `NO_CONNECTOR` check now also accepts the plain-text `error code: 1033` that Cloudflare sends a non-browser client, so an opt-in named tunnel with no connector can start. The regex still rejects a bare 1033 and `errorCode: 1033`, and a new test covers the change. The PR fails one rule for `Refs:` PRs: its body names what it delivers but not what remains of #8607 for later work.
- PR body: it says `Refs: #8607` and describes the fix, but never says what remains of #8607 for later work. A `Refs:` PR must name that. Add a short 'Remaining for #8607' section listing the parts still open, such as setting up the scoped API token and the DNS record for `planning-interview.melodicsoftware.com`, or whatever is actually still undone. If nothing remains, close the issue with `Closes #8607` instead.
- plugins/planning/shared/share.py:306: the new `NO_CONNECTOR` regex (`\berror(?: code)?:? 1033\b`, case-insensitive) correctly matches both `Error 1033` and `error code: 1033`. It does not match `errorCode: 1033` or `error code: 1016`. No code changes are needed.
- plugins/planning/shared/tests/test_share.py:1204: the new plain-text test and the held `error code: 1016` case cover the change.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass at a new commit removes the label.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Oct 29, 2026
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Oct 29, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit fa04288 Oct 29, 2026
48 checks passed
@kyle-sexton
kyle-sexton deleted the fix/8607-plain-text-no-connector branch October 29, 2026 14:14
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 0, timeout 0, no coverage 0, invalid 0, not run 1.
Covered-code score n/a; mutation score n/a.

File Killed Survived Timeout No coverage Invalid Not run
plugins/planning/shared/share.py 0 0 0 0 0 1

The run's summary has the full report.

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