Skip to content

feat(docs): replay the Discovery tutorial from its page - #1612

Merged
jeremi merged 6 commits into
mainfrom
feat/tutorial-runner-discovery
Sep 27, 2026
Merged

jeremi merged 6 commits into
mainfrom
feat/tutorial-runner-discovery

Conversation

@jeremi

@jeremi jeremi commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Replaces docs/site/scripts/check-discovery-tutorial.sh with the page-as-spec runner: node docs/site/scripts/run-tutorial.mjs --gate discovery now replays publish-and-consume-discovery-index.mdx from a copy of the checkout.

Stacked on #1609 (Relay). Until that merges, this diff also shows its three commits; only the last two commits belong here.

What changed

  • The tutorial is rewritten for a human reader. The single wrapper script that hid about 13 actions is gone. The reader copies the operator project, reads origins.yaml and the mapping, runs discoveryctl check and discoveryctl build against a local publication server, serves the index, and runs each curl call themselves. Every command's output is on the page and is checked by the gate.

  • The native-client handoff is now prose (decision D1a). The page no longer shows [handoff] lines. Those came from native_journey.rs over unrelated fixtures, so they did not describe what the reader had just built. The page explains what a selection holds, says that trust and invocation stay outside Discovery, and links the unified client reference.

  • verify_outputs.py is no longer on the page (decision D2a). The raw JSON responses are pinned with test-expect; originFetchedAt is a placeholder.

  • Prerequisites are smaller. Bash, Node and npm are no longer needed, because the page no longer runs the language bindings.

  • Discovery toolset. toolsets.mjs gains discovery. Every toolset's command regex now also excludes = before a name, so a query value such as serviceKind=relay is not claimed as a Relay command (tests first, in toolsets.test.mjs).

  • CI. The discovery-contracts job gets npm ci, the runner tests, the dry run and the replay, reusing the binaries the adopter-tutorial step already built. ci_changes.py routes the runner inputs and the page to that job.

  • Removed: check-discovery-tutorial.sh and its test, plus products/discovery/scripts/test-adopter-tutorial.sh and verify_outputs.py (second commit). Everything the adopter script checked is covered elsewhere:

    • the page gate replays the journey;
    • test-http.sh runs the native handoff journey;
    • the client-bindings job runs the Node and Python binding tests.

    The one check only that script ran was the Discovery binding tests on macOS. The nightly macOS contributor workflow now runs them directly, after registry_prepare_cargo_runtime. DoD 16.7 drops the script from its evidence, and 16.8 cites run-tutorial.mjs instead. publication_server.py stays, because the page starts it.

Review notes

This is docs and CI only; no runtime code changed. The --allow-loopback explanation on the page was checked against is_valid_endpoint_url in registry-discovery-profile: without the flag, only https endpoints are accepted.

Verification

  • The gate replays and passes locally (macOS). A deliberately wrong catalogRevision makes it fail.
  • npm test in docs/site: 619 pass. Runner tests: 91 pass.
  • The markdown, content, style, draft-links and evidence-anchor checks pass.
  • The dry runs pass for breg, casework, evidence, relay and discovery.
  • The macOS binding step passes locally (Node 7/0, Python 15 OK). products/discovery/scripts/check-contracts.sh passes. scripts/test_cargo_runtime_script_contracts.py passes.
  • python3 -m unittest discover -s .github/scripts -p test_ci_changes.py passes (123 tests). actionlint is clean.

Codex round 1

  • macOS build: the page now builds through scripts/cargo-runtime-library-path.sh. A plain cargo build leaves discoveryctl unable to load AWS-LC FIPS on macOS; I reproduced that. The first shell now runs every Discovery command. Before, discoveryctl build ran in a second shell without the binaries on PATH.
  • catalogRevision: the page now describes it as a semantic digest, and names originContentDigest as the value for exact-byte changes.
  • DoD 16.8: now also cites the native journey test.
  • Stopping background processes where the reader presses Ctrl+C: ticketed as Tutorial runner: stop a background process where the reader presses Ctrl+C #1613.
  • The narrowed-answer and test-append findings: fixed on feat(docs): replay the Relay tutorial from its page #1609.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 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-09-27T15:50:56.863193Z 6f17a10 New commits
ℹ️ 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 chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ec88042cf

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

Comment thread docs/site/src/content/docs/tutorials/publish-governed-sqlite-registry.mdx Outdated
Comment thread docs/site/scripts/run-tutorial.mjs

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf8739eb31

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

Comment thread docs/site/src/content/docs/tutorials/publish-and-consume-discovery-index.mdx Outdated
Comment thread products/discovery/contracts/definition-of-done.yaml Outdated
Comment thread docs/site/src/content/docs/tutorials/publish-governed-sqlite-registry.mdx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd89a5c451

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

Comment thread docs/site/scripts/tutorial-runner/toolsets.mjs
Comment thread products/discovery/contracts/definition-of-done.yaml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0653fa3274

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

Comment thread .github/workflows/macos-contributor.yml
Comment thread docs/site/src/content/docs/tutorials/publish-governed-sqlite-registry.mdx Outdated
@jeremi
jeremi force-pushed the feat/tutorial-runner-discovery branch from cc54b0d to e88b59c Compare September 27, 2026 10:59
@jeremi
jeremi enabled auto-merge September 27, 2026 10:59
@jeremi
jeremi disabled auto-merge September 27, 2026 11:37
@jeremi
jeremi added this pull request to the merge queue Sep 27, 2026
@jeremi
jeremi removed this pull request from the merge queue due to a manual request Sep 27, 2026
The page now walks the reader through each step the product runner
used to hide: copy the operator project, check it offline, serve the
provider descriptions, build, serve the index, resolve, and search.
Every answer is pinned on the page, so the gate is the page.

The native client handoff becomes prose with a link to the client
reference; the page no longer claims a result that came from unrelated
test fixtures. products/discovery/scripts/test-adopter-tutorial.sh stays
as the product's own journey gate.

A word right after `=` is a value such as serviceKind=relay, not a
command, so no toolset claims a page for it.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…places

The tutorial page is now replayed by the page-as-spec runner, test-http.sh
already runs the native handoff journey, and the client-bindings job runs
the Node and Python binding tests. The one check only this script ran was
the Discovery binding tests on macOS, which the macOS contributor workflow
now runs directly after preparing the AWS-LC FIPS runtime library.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…e shell

The page built with plain cargo build, which leaves the AWS-LC FIPS
library out of reach of the binaries on macOS, and it ran discoveryctl in
a second shell that never had them on PATH. The build now goes through
the repository's runtime-path helper, and the first shell runs every
Discovery command while the second runs only Python and curl.

The catalog revision is described as the semantic digest it is, with
originContentDigest named for exact-byte changes, and DoD 16.8 cites the
native journey test that exercises selection, trust, and native handoff.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
A toolset built from source served its binaries by symlink, so on macOS
they could not find the AWS-LC FIPS dylib Cargo supplies only to the
processes it launches. The toolset now reads the build messages for that
directory and serves each binary through a wrapper that sets
DYLD_FALLBACK_LIBRARY_PATH itself, which survives protected shells.

The Discovery verification record names the page gate that replaced the
retired adopter script.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…n macOS

The Relay page presents runtime.yaml as the file relayctl init writes, so
the reader reads it with cat and the gate compares all of it. The nightly
macOS job replays the Discovery tutorial built from source, the path the
runner serves with the AWS-LC FIPS runtime library.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…ified package

discoveryctl build became discoveryctl package, and Discovery now starts
from a verified package named by absolute paths. The page runs the package
step, pins the stable catalog and mapping revisions while leaving the
per-run package digest as a placeholder, and says why that digest changes.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi force-pushed the feat/tutorial-runner-discovery branch from e88b59c to 6f17a10 Compare September 27, 2026 15:47
@jeremi
jeremi enabled auto-merge September 27, 2026 15:47
@jeremi
jeremi added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit 680c4e0 Sep 27, 2026
54 checks passed
@jeremi
jeremi deleted the feat/tutorial-runner-discovery branch September 27, 2026 16:27
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