Skip to content

RFC: conformance suite for forge generators - #45

Open
teamchong wants to merge 4 commits into
cloudflare:mainfrom
teamchong:feat/conformance-spec
Open

teamchong wants to merge 4 commits into
cloudflare:mainfrom
teamchong:feat/conformance-spec

Conversation

@teamchong

@teamchong teamchong commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

RFC for a conformance suite any forge target can run.

Question it answers: if I write a new target plugin, how do I know it covers all the cases?

A case is data: one call, the HTTP exchanges the server must see, and the result the caller must get. A target generates a client for the suite API and wraps it in a small program that reads cases and writes results as JSON lines. A standalone runner serves the exchanges and checks the results:

forge-conformance --cases ./cases --client "node ./client.js" --expect-fail ./expected-failures.yaml

The runner builds nothing and knows nothing about the target's language, so targets outside this repo use it the same way.

conformance/RFC.md defines the case schema, the client protocol and the runner's behaviour. The cases and suite API come once the shape is agreed.

@teamchong
teamchong force-pushed the feat/conformance-spec branch from 8f4ad3e to 44c14bb Compare October 15, 2026 02:41
@teamchong teamchong changed the title Conformance suite spec RFC: conformance suite for forge generators Oct 15, 2026
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
@teamchong
teamchong force-pushed the feat/conformance-spec branch from 44c14bb to d1ffe93 Compare October 15, 2026 02:59
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
@teamchong
teamchong force-pushed the feat/conformance-spec branch from d1ffe93 to f7f6e08 Compare October 15, 2026 18:00
@teamchong
teamchong force-pushed the feat/conformance-spec branch from f7f6e08 to ea71832 Compare October 15, 2026 18:11
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
Comment thread conformance/RFC.md Outdated
headers?: Record<string, Value>; // header parameters, by field name
body?: Value; // request body, with object keys in field names
};
exchanges: Exchange[]; // in order; empty when the call must fail before sending

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the case for more than 1?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only pagination (iterate) needed multiple exchanges, and client errors needed []

with both removed, now I changed it to exchange: Exchange.

Comment thread conformance/RFC.md Outdated
Comment on lines +122 to +123
| { kind: 'client'; message?: string } // refused before sending
| { kind: 'network'; message?: string }; // no response

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to account for these?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed both (along with disconnect: true in respond). Result now only covers response and api

@teamchong
teamchong requested a review from srikrsna October 21, 2026 15:57
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.

2 participants