feat(tutorial): Track 1 (YAML/OpenAPI) example files — maritime red-thread#66
Open
eskenazit wants to merge 3 commits into
Open
feat(tutorial): Track 1 (YAML/OpenAPI) example files — maritime red-thread#66eskenazit wants to merge 3 commits into
eskenazit wants to merge 3 commits into
Conversation
…WIP, /users domain, to be realigned to maritime) Refs #49. WIP checkpoint for handoff: example files are still on the placeholder /users domain and will be realigned onto the shared maritime Shipyard contract (GET /ships, /ships/{imo_number}, /crew). EXPECTED-OUTPUT.md is an unverified engine-fidelity hypothesis pending the JVM gate (stage 2).
Realign the runnable Track 1 example files (step-1..7, schema) from the old /users domain onto the Modern Maritime Registry API contract (GET /ships, /ships/{imo_number}, /crew), per the shipyard tutorial drydock. Read-only: each step's defect now rides a GET operation. Add LIMITATIONS.md documenting that all diagnostics are UNVERIFIED (stale alpha3 local CLI vs beta1 repo), the missing CI harness, and the deferred Step 5 casing rule. Refs #49.
Run the 7 Track 1 lint examples against a freshly built polychro 1.0.0-beta1 CLI and replace the UNVERIFIED hypotheses in EXPECTED-OUTPUT.md with the real per-step output. Document two known limitations found during verification: a non-string-key false positive on quoted HTTP status codes (LIMITATIONS #5) and Step 4's .polychro.yml schema config not being consumed (LIMITATIONS #6). Documented only, nothing fixed. Refs #49.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #49
What does this PR do?
Adds the Track 1 (YAML / OpenAPI) tutorial example files under
examples/tutorial/track-1-yaml/, plus thetuto_writeragent that authored them.These are the runnable artifacts the public Shipyard tutorial page links to. The maritime
red-thread example (a Modern Maritime Registry API scoped to
/ships,/ships/{imo_number}and
/crew) grows step by step across seven OpenAPI documents:step-1-openapi.yml…step-7-openapi.yml— the seven progressive OpenAPI specs.openapi-ruleset.yml— the custom Polychro ruleset used from Step 3 on.openapi-schema.json— the JSON Schema referenced by Step 4..polychro.yml— the project config used by Step 4.functions/operation-id-unique.js— the polyglot custom rule used in Step 6.EXPECTED-OUTPUT.md— the exact CLI output for every step, verified againstpolychro 1.0.0-beta1-SNAPSHOT.LIMITATIONS.md— two known beta1 gaps documented (not fixed) and explicitly out of scope:non-string-keyfalse positive on a quoted"200"key.config.json-schemain.polychro.ymlis not consumed yet.Every diagnostic and exit code documented here was produced by running the real beta1 CLI —
nothing is hand-written.
The public tutorial page in
naftiko/shipyard#150links to these files on
main:https://github.com/naftiko/polychro/blob/main/examples/tutorial/track-1-yaml/…https://raw.githubusercontent.com/naftiko/polychro/main/examples/tutorial/track-1-yaml/…Those links only resolve once this PR is merged. Merge this PR first, then Shipyard #150.
Merging Shipyard #150 first would publish a page with broken file links.
Tests
No automated tests in this PR — it adds example fixtures and documentation only.
The example outputs were validated manually against the real
1.0.0-beta1-SNAPSHOTCLI(classpath run from
examples/tutorial/track-1-yaml/); the produced diagnostics, exit codes andthe
--format agentJSON matchEXPECTED-OUTPUT.mdexactly.A follow-up under #49 will add a JUnit harness that lints each example and asserts its
diagnostics, wired into CI.
Checklist
mainAgent Context (optional)