Skip to content

docs: Add example-authoring guidelines and Copilot review rubric - #1644

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
phlax:contributing-guidelines
Nov 20, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
phlax:contributing-guidelines

Conversation

@phlax

@phlax phlax commented Nov 20, 2026

Copy link
Copy Markdown
Member

Examples here are documentation-first sandboxes for released Envoy features, but those conventions weren't written down anywhere — so contributors (and reviewers) had nothing concrete to work to. This captures them.

  • CONTRIBUTING.md — what qualifies (released, stable features; one feature per directory/PR), docs-first (example.rst as numbered Steps), verify.sh as a CI-only 1:1 mirror of the documented steps using the verify-common.sh helpers (dynamic ports, published proxy port, no bespoke test harness), and the no-third-party-services rule with the narrow single-page-app OAuth exception (Envoy demonstrated first; external hookup last).
  • README.md — links to it.
  • .github/copilot-instructions.md — the same checklist as a review rubric, so Copilot assesses example PRs on exactly these points.

The guidelines are descriptive of existing good examples (e.g. ai-transcoder); the immediate motivation was a recent example PR that diverged on most of these axes.

(bot assisted)

@phlax

phlax commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

cc @botengyao

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The guidance in CONTRIBUTING.md and .github/copilot-instructions.md incorrectly bans valid fixed container listeners instead of requiring overridable published host ports and resolved variables in verification requests.

1 open issue
What changed in this PR

Documents contributor expectations for documentation-first sandboxes that demonstrate released Envoy features, and adds a matching Copilot review rubric.

Changes:

  • Defines example scope, numbered documentation steps, and matching CI verification.
  • Documents requirements for ports, self-contained upstreams, external-service exceptions, and CI registration.
  • Makes the guidance discoverable from the README and incorporates it into review instructions.
File Description
README.md Links to the example-authoring guidelines.
CONTRIBUTING.md Adds contributor requirements and an example checklist.
.github/​copilot-instructions.md Adds review checks derived from the contributor guidelines.

Review effort: Balanced

Comment thread CONTRIBUTING.md Resolved
@phlax
phlax force-pushed the contributing-guidelines branch from b0ad3b2 to d768517 Compare November 20, 2026 13:51
@phlax
phlax requested a balanced review from Copilot November 20, 2026 13:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The unconditional 1:1 rule conflicts with the external-service setup exception, which needs to be reflected consistently in the guidance and checklists to avoid flagging permitted examples.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread CONTRIBUTING.md Resolved
@phlax
phlax force-pushed the contributing-guidelines branch from d768517 to dfa4a8d Compare November 20, 2026 14:24
@phlax
phlax requested a balanced review from Copilot November 20, 2026 14:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the contributor guidelines and aligned Copilot review rubric.

1 open issue

Review effort: Balanced

@phlax
phlax force-pushed the contributing-guidelines branch from dfa4a8d to ff62f68 Compare November 20, 2026 14:26
@phlax
phlax requested a balanced review from Copilot November 20, 2026 14:26
Comment thread .github/copilot-instructions.md Outdated
`envoyproxy/envoy:dev`, or a dependency on a filter/config that is not in a published
Envoy release. The example's Envoy image and bzlmod module should be the last published
version, not a dev snapshot.
2. **Stable filter.** Flag examples for filters under active correctness churn or still

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I understand we want to introduce stable examples, but in the AI era, many functions are alpha in nature, would it make sense to relax this requirement? if not we should find a new place to host that alpha examples.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it didnt with the transcoder example we had to disable it almost immediately

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i think the point is this ... there are filters/extensions in envoy that have remained alpha/wip for years with little change - i see no problem including in that case (with banner saying its not covered by sec policy etc)

that is a different case to the mcp-transcoder pr which changed almost immediately - or the other mcp here which is full of workarounds for known/current/active bugs - its these cases we dont want to carry - they really are not stable enough to exemplify

@botengyao botengyao Nov 20, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I understand it could break, but what is the best way to show users that we have these features nicely and easily?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ideally by stabilizing

but if they are at least in a published release - then we exemplify that - that risks breaking envoy ci when the code changes - but in that case we would have to figure out workarounds/shims/etc (this is what oauth did previously)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can add a shim at first before adding new examples for AI examples, it that is okay, I am fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

really not following - how can you add a shim to something that doesnt exist?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I could misunderstand the "shim", I want to make sure when we are adding some examples: hey, the action item is to add a shim or some exception system that is easy enough to maintain since it is alpha, no matter which one is happening at first, will not block the PR. Does this guideline sound reasonable to you?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

to be precise on the blocking point: verify_examples isn't a hard gate in envoy CI — it's advisory, it goes red rather than failing the merge. but if your envoy PR breaks a documented example, you're expected to fix it, and we do take that signal — so in practice it will hold your envoy PR up. so "won't block the PR" isn't quite right: it blocks it the way a failing-but-not-required check does — by review, not by a hard gate.

tl;dr: if you don't document an unstable feature here, you never need a shim. if you do, then every breaking change you later make in envoy needs the shim dance first — that's the ongoing cost you're signing up for.

what the shim is, concretely — say there's an example for filter foo and you want to rename a config field old → new in envoy:

  • a single envoy PR doing the rename breaks it: envoy's verify_examples runs the current example (still using old) against envoy HEAD → red.
  • so the dance is:
    1. examples PR first — make the example tolerate both old and new (the shim), so it stays green against the published release (old) and against envoy HEAD once the rename lands.
    2. envoy PR — do the rename; verify_examples is now green because the example already handles new.
    3. examples PR later — once the rename is in a published release, drop the shim and move the example to new only (and repin to the released version).

so it's 2–3 coordinated cross-repo PRs for every breaking change. that's cheap for a stable filter (changes are rare), but for an alpha one that changes often it's real recurring overhead — which is exactly why we're cautious about documenting unstable features. it won't block you in a hard-CI sense, but the maintenance is the thing to weigh.

(bot assisted)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

also, two things i glossed:

  1. it's a bit more than those 2–3 PRs, because the accommodation usually needs an envoy module published to our registry for examples to pin — the "publishing dance." so a breaking change can run: examples shim PR → interim-publish an envoy module to the registry → envoy change → (later) examples cleanup + repin to the released version.

  2. the case we really want to avoid is a filter that has never been in any envoy release — nothing published exists to pin, the example can only run on :dev, and every change churns the full dance. what makes it tractable at all is that we already have a system for interim-publishing envoy to our registry: that's what shims pin against, and it's specifically how you'd add an example for a new filter ahead of its release — interim-publish the module carrying it and pin the build to that (the runtime container stays :dev until the release ships, then repin).

and on docs: they should always be consistent with what they'll be at the next release — i.e. tracking envoy head, since head is what becomes that release. keep the docs matching head and they're already correct when it ships.

(bot assisted)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The filename-based review scope excludes existing sandbox layouts, leaving changes to those examples outside the rubric.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread .github/copilot-instructions.md Resolved
@phlax
phlax force-pushed the contributing-guidelines branch from ff62f68 to 3710799 Compare November 20, 2026 14:39
@phlax
phlax requested a balanced review from Copilot November 20, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the sandbox authoring guidelines and matching Copilot review rubric.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@phlax
phlax force-pushed the contributing-guidelines branch from 3710799 to 1733e17 Compare November 20, 2026 15:24
@phlax
phlax requested a balanced review from Copilot November 20, 2026 15:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

CONTRIBUTING.md misrepresents the advisory verify_examples check as blocking Envoy PRs and requires every shim to be published first, giving contributors a conflicting release procedure.

1 open issue

Review effort: Balanced

Comment thread CONTRIBUTING.md Resolved
@phlax
phlax force-pushed the contributing-guidelines branch from 1733e17 to dbedf82 Compare November 20, 2026 15:27
@phlax
phlax requested a balanced review from Copilot November 20, 2026 15:27
@phlax
phlax force-pushed the contributing-guidelines branch from dbedf82 to 018483b Compare November 20, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The CONTRIBUTING.md guidance contradicts the cited runbook by requiring publication before every breaking Envoy change, creating an unnecessary release dependency.

1 open issue

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the contributor guidance and matching Copilot review rubric.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the contributor-guidance and Copilot review-rubric updates.

No open issues 🎉

Review effort: Balanced

@phlax
phlax force-pushed the contributing-guidelines branch 2 times, most recently from e1f9364 to 4f6f421 Compare November 20, 2026 16:23
@phlax
phlax requested a balanced review from Copilot November 20, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documentation incorrectly promises verification coverage for examples excluded from EXAMPLE_TESTS, even though Envoy’s verify_examples suite excludes them too.

1 open issue

Review effort: Balanced

Comment thread CONTRIBUTING.md Resolved
@phlax
phlax force-pushed the contributing-guidelines branch from 4f6f421 to 123fa52 Compare November 20, 2026 16:26
@phlax
phlax requested a balanced review from Copilot November 20, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documentation promises upstream coverage for examples excluded from EXAMPLE_TESTS, but that exclusion also removes them from Envoy’s default-branch CI suite, so the coverage gap needs to be documented.

2 open issues

Review effort: Balanced

Comment thread CONTRIBUTING.md Resolved
@phlax
phlax force-pushed the contributing-guidelines branch from 123fa52 to f77f966 Compare November 20, 2026 16:31
@phlax
phlax requested a balanced review from Copilot November 20, 2026 16:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

CONTRIBUTING.md presents released-versus-main CI coverage as current behavior, but CI still uses the dev image and the released-image migration remains unfinished.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread CONTRIBUTING.md
Comment on lines +87 to +90
An example pins and ships the **last published** Envoy. Envoy's own `verify_examples` job
runs the examples against Envoy **`main`** (via a local override of this checkout), so each
side tests a *different* Envoy: examples = the published release (what the example ships),
envoy = `main` (early warning that a change is about to break an example). `verify_examples`
@phlax
phlax force-pushed the contributing-guidelines branch from f77f966 to 0f61192 Compare November 20, 2026 16:35
@phlax
phlax requested a balanced review from Copilot November 20, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The contributor guide presents released-image CI coverage as current, but the Dockerfile and verification workflow still use dev images and the release-image switch remains pending.

2 open issues

Review effort: Balanced

Comment thread CONTRIBUTING.md
Comment on lines +87 to +92
An example pins and ships the **last published** Envoy. Envoy's own `verify_examples` job
runs the examples against Envoy **`main`** (via a local override of this checkout), so each
side tests a *different* Envoy: examples = the published release (what the example ships),
envoy = `main` (early warning that a change is about to break an example). `verify_examples`
is **advisory** — it goes red, it does not hard-block an Envoy PR — but a red example is the
standing expectation that the Envoy change waits until the example is accommodated.
@phlax
phlax force-pushed the contributing-guidelines branch from 0f61192 to 6015563 Compare November 20, 2026 16:39
Comment thread .github/copilot-instructions.md Outdated
@@ -0,0 +1,63 @@
# Copilot review instructions — envoyproxy/examples

The examples in this repo are **documentation-first sandboxes**: each teaches one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not strictly accurate - it can teach a combination of features to a given end - eg single-page-app

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed — the intro now says each example teaches a released Envoy feature or a combination of features toward one end (with single-page-app cited); CONTRIBUTING.md's opening matches. (bot assisted)

Comment thread .github/copilot-instructions.md Outdated
`single-page-app`). Flag it when the external hookup is woven into the Envoy
demonstration rather than appended as reader next-steps, or when the example would not
demonstrate the Envoy feature with the external service removed.
8. **CI registration.** Flag an added example that isn't in `EXAMPLE_TESTS` (`BUILD`) — it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this doesnt make any sense - and i dont think these guidelines (need to) go into all the parts needed - that should be obv from previous examples

what it probably should say is that it should be broadly consistent with existing examples

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed — point 8 is now Consistent with existing examples: take the existing sandboxes as the reference rather than any checklist here, and flag only noticeable divergence. Dropped the EXAMPLE_TESTS enumeration (it's obvious from the other examples). (bot assisted)

Comment thread CONTRIBUTING.md Outdated
config/behaviour changes release-to-release, or where the example would carry workarounds
for currently-open bugs. That is a conformance suite, not an example — it belongs in
Envoy's integration and fuzz tests.
- **One feature, one directory, one PR.** Don't bundle two filters or two sandboxes in a

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

see previous comment - one sandbox, one pr

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed — now One sandbox, one PR (the unit is the sandbox, not the feature; a single example may combine features toward one end). The checklist item is updated to match. (bot assisted)

@phlax
phlax force-pushed the contributing-guidelines branch from 6015563 to 96923e2 Compare November 20, 2026 19:20
Examples here are documentation-first sandboxes for released Envoy
features. Capture the conventions explicitly so contributors (and
reviewers) have something concrete to work to:

- CONTRIBUTING.md: what qualifies (released, stable features; one per PR),
  docs-first, verify.sh as a CI-only 1:1 mirror of the documented steps,
  the verify-common.sh shape (dynamic ports, published proxy port, no
  bespoke harness), and the no-third-party rule with the single-page-app
  exception.
- README.md: link to it.
- .github/copilot-instructions.md: the same checklist as a review rubric,
  so Copilot assesses example PRs on this basis.

Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax
phlax force-pushed the contributing-guidelines branch from 96923e2 to 037e3a9 Compare November 20, 2026 19:26
@phlax

phlax commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

gonna land this - its not perfect - but a good start i think

honestly im still trying to figure out workflows envoy <> registry <> examples

@phlax
phlax merged commit 99c07e6 into envoyproxy:main Nov 20, 2026
8 checks passed
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.

3 participants