Repository navigation
feat(contrat): un état brouillon pour un lab et pour un catalogue (#369) - #372
Merged
Merged
Conversation
Un lab poussé sur main pour être partagé devenait visible comme s'il était fini, et un catalogue sans lab publié était proposé par `catalog list`. Lab : `status: draft | published` dans lab.yaml, `published` par défaut. Un brouillon quitte list-labs (sauf --drafts, où il est marqué), next et start, course (sauf --drafts), progress, l'export et push. run, check, submit et show l'acceptent par son identifiant, avec une ligne qui dit que c'est un brouillon. validate-structure le valide comme les autres et signale une valeur inconnue, qui se comporte comme `published` (même politique que `feedback`). scores ne change pas : historique local. `status` est exposé dans le lab de --json. Catalogue : `draft: true` au manifeste packagé. catalog list et l'accueil ne le proposent plus (catalog list --drafts le montre), catalog add l'installe toujours. certificats repasse en brouillon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…un lab La 0.9.2 mesurait certificats à zéro lab, l'écartait de la table du README, et laissait catalog list le proposer quand même. Une entrée sans `draft` qui ne publie aucun lab est désormais un écart (sortie en 1), avec un message qui dit de la passer en `draft: true` ou de la retirer. Une entrée en brouillon est mesurée, reste hors de la table même avec des labs, n'est jamais un écart, et n'est pas signalée comme dépôt public oublié. Mesuré le 2026-11-14 sur GitHub : `--check` sort en 0, 699 labs sur 18 dépôts publiés hors brouillon, certificats en brouillon à 0 lab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… publié contract-v1 (EN et FR) : le champ `status`, sa valeur par défaut, son effet commande par commande, la politique d'une valeur inconnue, et le `draft: true` du manifeste. machine-output (EN et FR) : le champ `status` de l'objet lab, extension compatible. CHANGELOG EN et FR : section [Unreleased], sans bump de version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.fr.md # CHANGELOG.md
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.
Summary
Closes #369. The v1 contract had no draft state. A lab was a draft only as long as it was not pushed, and 0.9.2 offered
certificats, an empty repository, incatalog list.Lab:
status: draft | publishedinlab.yaml,publishedby default, so no existing catalogue changes.list-labs--draftsshows it, marked "(draft)" / "(brouillon)"list-labs --json,show --json"status": "draft"or"published"(compatible extension, documented indocs/machine-output)next(and thereforestart)remainingcourse--draftsprogresspush,exportexport --lab <draft>exits 1run,check,submit,show--json)validate-structurestatusvalue is reportedscoresCatalogue:
draft: truein the packaged manifest.catalog listhides a draft entry;catalog list --draftsshows it.catalog list --jsoncarriesdraft.catalog addstill works by id or by URL.certificatsstays in the manifest asdraft: true, as the issue asks.scripts/gen-catalogues.py:certificats.--checkexits 0, with 699 labs on 18 published non-draft repositories.Decisions taken while implementing, to review
statusvalue follows the same policy asfeedback: the parser keeps it,validate-structurereports it, and the lab behaves aspublished. So a typo indraftpublishes the lab, and only the catalogue's CI says so.challenge,hint,guide,resetandcleanwork on a named draft, without an information line.Type of change
Checklist
Always
ruff check src/dsoxlab tests tests_e2e fuzz scripts: passedmypy src/dsoxlab: no issues in 123 filespytest: 2,277 passedtests/test_etat_brouillon.py(27),tests/test_catalogue_brouillon.py(7), plus 5 intest_gen_catalogues.py.git archiveof origin/main: 32 fail, 12 pass.next,progressor apush.pytest tests_e2e: 18 passedcomplexite.py --verifierandcomplexite-ecran.py --verifier: stable.progresswent over the threshold and was brought back down without refreezing.test_le_moteur_ne_code_aucun_nom_de_cataloguepassesWhen behavior changes
CHANGELOG.mdandCHANGELOG.fr.md:[Unreleased], Added and Fixed, to ship in 0.9.3When a command or option is added, removed or changed
help=_()and fullhelp in EN and FR for the three new options:list-labs --drafts,course --draftsandcatalog list --draftsWhen
.github/workflows/is touchedN/A.
When the declarative contract changes
docs/contract-v1(.fr).md: field, default value and a per-command table.schemas/lab.schema.jsonupdated (there is no manifest schema).fuzz/corpus/lab_yaml/status-draft.yaml, plus dictionary entriesfeedbackLeft open: the lab catalogues'
CLAUDE.mdfiles (not versioned), and the JSON ofcatalog listindocs/machine-output, where that command was never documented.🤖 Generated with Claude Code