Skip to content

docs(adr): ADR-0062, a conformance suite driven by the stock OpenSSH client - #289

Merged
gonzafg2 merged 2 commits into
mainfrom
docs/adr-0062-conformance-suite
Nov 21, 2026
Merged

gonzafg2 merged 2 commits into
mainfrom
docs/adr-0062-conformance-suite

Conversation

@gonzafg2

@gonzafg2 gonzafg2 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

ADR-0062, as Proposed. It decides how the OpenSSH interop gate (ADR-0020) grows into the conformance suite that Phase 3 lists. Nothing is implemented here.

The problem

The gate makes 15 checks. Each was added by the ADR of a feature.

  • No rule says which behaviours get a check.
  • Nothing lists what is not checked. For everything else a stock client can reach, the only tests are in-process: the project's own test client against the project's own server.
  • One check, negative_no_hybrid, passes for any failure, including a server that is down.

What the ADR decides

  • What belongs in the suite. A behaviour that a document of this project states and that a stock OpenSSH client tool reaches with its options alone. Refusals count.
  • One case per behaviour, citing its document. When no document states the behaviour, the document gets its sentence first, in the same PR. An accepted ADR whose text was wrong when it was accepted takes an erratum (ADR-0015).
  • A catalogue file that the run enforces. A case with no line, a line with no case, or a case that did not report fails the run.
  • A case must fail for the right reason. A refusal case asserts the refusal. A case about which side acted reads it from the audit log.
  • The same bash script, on the pinned client. Nothing is added to the gate image, no leg gains a toolchain, and it runs where the gate runs today: on every PR and on every release artifact.
  • No tiers and no version matrix. A client bump runs every case against the new client.

What a probe showed

22 behaviours outside the gate, tried by hand on 2026-11-20 with OpenSSH 10.6p2 on macOS arm64 against main at 04503b0. That client is not the pinned one. The table is in the ADR.

Nineteen behaved as their documents say. Three did not match a document:

  • ssh-keyscan cannot read the host key. It negotiates no strict-kex, so the server disconnects it with code 3, no-strict-kex. That follows from the fail-closed rule, and no document says it.
  • The size of the authentication budget, 12 attempts, is in the code only.
  • A forwarding channel opened while a session is open gets "administratively prohibited", where ADR-0023 gives a non-session type "unknown channel type". The code has done so since M5 (feat(core): M5 — channel layer + single-command exec #84), before ADR-0023 was accepted. Both answers refuse the channel.

And one case would have tested the wrong side: under ChaCha20 the re-key after 1 GiB is started by the client, whose own limit is also 1 GiB. The server starts it only under AES-GCM.

What a reviewer may want to question

  • bash, not Rust (§5, Alternative 2). The release gates run this script with no toolchain (ADR-0055 §1), so a Rust harness would be a second one.
  • Everything in the required check (§6). The step takes 3 seconds today. A script that tried the 22 behaviours took 21 seconds locally. The implementing PR measures it on the PR runner.
  • One client version (§7).
  • The claim is narrow (§1). It is not conformance with RFC 4253 at large.

What it does not decide

Nothing in the server changes. ssh-keyscan stays refused. The implementing PR puts the three behaviours right in documents first: two sentences, and an erratum to ADR-0023.

Checks

Documentation only: one new file. Every ADR it links exists.

Refs #248

…client

Phase 3 lists conformance tests against the OpenSSH client, and #248
gives the work an ADR that extends ADR-0020. This is it, as Proposed.

The interop gate makes 15 checks, each added by the ADR of a feature. No
rule says which behaviours get one, and nothing lists what is not
checked. The ADR decides how the gate grows into the suite:

- a behaviour belongs when a document states it and a stock client tool
  reaches it, refusals included;
- one case per behaviour, citing its document, and the document gets its
  sentence first when none states the behaviour;
- a catalogue file that the run enforces, so a dropped case fails;
- a refusal case asserts the refusal, and a case about which side acted
  reads it from the audit log;
- the same bash script, on the pinned client, with nothing added to the
  gate image, on every PR and on every release artifact.

A probe of 22 behaviours with OpenSSH 10.6p2 backs it. Nineteen behaved
as documented. Three are stated in no document, or not in full: the
server refuses ssh-keyscan, which negotiates no strict-kex; the size of
the authentication budget; and which failure a forwarding channel gets
while a session is open. The re-key after 1 GiB turned out to be started
by the client under ChaCha20, and by the server only under AES-GCM.

Nothing is implemented here.

Refs #248

Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T19:32:17.428109Z 9bd297f Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 0f89663156

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@claude

claude Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

PR Review: docs(adr): ADR-0062, a conformance suite driven by the stock OpenSSH client (#289)

Decision: 🟡 Minor changes
Iteration: First review
Lenses applied: Design decision (docs/adr/)

Executive summary

ADR-0062 extends the OpenSSH interop gate into a full conformance suite: a catalogue-enforced bash script with one case per documented server behaviour. The structure is sound, all 18 linked ADRs and 3 RFCs exist, planned work is correctly marked as such, and no MANIFIESTO commitment is weakened. Two consistency issues need attention so the implementing PR can safely translate the probe table into test cases.

New findings

🟡 Important (should be resolved)

[docs/adr/0062…:76] — scope inconsistency (confidence: 90)

Problem: The probe table's "Stated in" column cites `README.md`, zero legacy for the "Password and keyboard-interactive" row. §1 defines qualifying documents as "an ADR, an RFC, the threat model or docs/deployment.md" — README.md is not on that list. Because §9 commits to "a case for each behaviour in the probe's table", the implementing PR will anchor this case to a non-qualifying document, violating §1's own scope rule. The case should be treated like the three explicitly flagged undocumented behaviours: the implementing PR must add a sentence in a qualifying document first. Both qualifying sources already exist: docs/threat-model.md §5.3.1 and RFC-0011.
Fix: Change the "Stated in" cell to docs/threat-model.md §5.3.1, RFC-0011, and do not count this case among the "nineteen [that] behaved as their documents say" — treat it as a fourth undocumented behaviour.
Anchor: ADR-0062 §1 (scope rule); CLAUDE.md — ADR review lens: soundness of the design decision.

[docs/adr/0062…:99–105 and :168–169] — ADR-0015 errata path not taken (confidence: 80)

Problem: Context item 3 says "ADR-0023 does not say which failure a forwarding channel gets while a session is open." ADR-0023 does say it — a non-session channel type gets SSH_OPEN_UNKNOWN_CHANNEL_TYPE (code 3) — but channel.rs:736–745 checks "already open" before the channel type, so a direct-tcpip open during a session receives code 1 (SSH_OPEN_ADMINISTRATIVELY_PROHIBITED). The gap is a discrepancy between ADR-0023 and the code, not silence. §2 responds by routing the new sentence "into a document that can take it", citing that ADR-0015 forbids editing accepted ADRs. But ADR-0015 permits exactly this correction as a Post-acceptance errata note — a factual correction with a dated banner. Its own Alternative 3 explicitly rejects keeping corrections in a separate file, because that leaves the original ADR contradicting the code without any warning to a future reader.
Fix: In the implementing PR, add a Post-acceptance errata note to ADR-0023 (citing ADR-0015). Update §2 and §9 to reference this errata path for this specific gap. The security posture is unchanged: both codes refuse the channel open (fail-closed holds).
Anchor: ADR-0015; CLAUDE.md ADR governance rules.

…atum

Two corrections from review.

- The row on password authentication cited `README.md`, which §1 does not
  list as a document a case may rest on. Threat model §5.3.1 states the
  behaviour, with RFC-0011. The row cites them.
- The ADR said ADR-0023 does not say which failure a forwarding channel
  gets while a session is open. It does: a non-`session` type gets
  "unknown channel type". The server checks for an open channel first and
  answers "administratively prohibited", and has since M5 (#84), which
  merged before ADR-0023 was accepted. That is a text that was wrong at
  acceptance, so §2 and §9 now send it to an erratum under ADR-0015
  instead of to a sentence in another document.

Refs #248

Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 9bd297f030

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gonzafg2
gonzafg2 merged commit fa58b94 into main Nov 21, 2026
19 checks passed
@gonzafg2
gonzafg2 deleted the docs/adr-0062-conformance-suite branch December 1, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant