Files
obiskim/prompts/obi-migration.md
T
Eric Coissac b95348b226
ci.yml / build (pull_request) Successful in 4m10s
Release / create-release (push) Successful in 26s
Release / build-linux-x86_64 (push) Successful in 6m22s
Release / build-macos-arm64 (push) Successful in 2m23s
refactor: remove migrate-mphf tool and update sibling annex handling
Remove the `migrate-mphf` tool entirely, as its functionality is no longer needed or has been superseded. Update the `phylo` sibling annex logic to build missing annexes on demand under an exclusive lock, ensuring safe concurrent access. Adjust documentation and CI workflows to reflect the removal of the migration tool and clarify sibling annex behavior.

- Delete the entire `tools/migrate-mphf` directory, including `Cargo.toml`, `Cargo.lock`, and source files (`main.rs`, `layer.rs`, `plan.rs`, `data.rs`, `commit.rs`, `old.rs`, `verify.rs`, `util.rs`), removing functions such as `convert`, `build`, `permute_all`, `finish`, and `check`.
- Update `.gitignore` to remove patterns for `tools/migrate-mphf/target`, `data-stress`, `*.fasta`, and `*.fasta.gz`.
- Modify `Makefile` to remove the `migrate-mphf` and `clean-migrate-mphf` phony targets and associated build commands.
- Update `.gitea/workflows/release.yml` to remove the "Build migrate-mph (static)" job and the artifact upload step, and adjust the `linux-musl-cargo` job key to hash only `src/Cargo.lock`.
- Refactor `src/obikphylo/src/siblings/extensions/sibling_builder.rs` to update `build_family_annexes` documentation, noting that it builds the sibling annex from `siblings.psib` if missing and runs under the index's exclusive lock.
- Update `src/obikphylo/src/siblings/siblingannex.rs` documentation to clarify that `open` reports absent files differently when annexes were set aside by `migrate-mphf` or never built.
- Update `UserDocMD/usage/phylo.md` to clarify that `--sibling-annex` prepares the quartet annex on demand under an exclusive lock, and update descriptions for `--sibling-stats` and `--sibling-hist` to specify output file formats and contents.
- Update `DevDocMD/implementation/mphf_batch_queries.md` to reflect changes in batched query logic, `ptr_hash` versioning, and benchmark descriptions, noting that stale indexes with `ptr_hash` 1.x MPHFs fail on current binaries.
- Add `prompts/obi-migration.md` to document the context, decisions, and required actions for the `obikmer` project migration.
- Bump `obikmer` package version from 1.4.7 to 1.4.8 in `src/obikmer/Cargo.toml` and update `src/Cargo.lock` accordingly.
2026-12-01 10:31:25 +01:00

4.0 KiB

Contexte : projet obikmer (workspace Rust de 26 crates, dépôt jj+git). Dans la session précédente (lecture seule) nous avons étudié l'adoption par crate-kit (https://gargoton.petite-maison-orange.fr/LLM/crate-kit, clone local attendu à côté : ../crate-kit) sur le modèle de pmo-kit (/Users/coissac/Sync/maison/Petite_maisons/src/pmo/pmo-kit/, cluster /Users/coissac/Sync/maison/Petite_maisons/src/pmo/).

État supposé au début de cette session (à vérifier avant tout) :

  • J'ai déplacé le dépôt dans l'organisation « obi » de forge.metabarcoding.org (Gitea) et le répertoire local obikmer dans un dossier local obi/ (cluster, comme pmo/).
  • L'ancienne origine était git@forge.metabarcoding.org:OBIKmers/obikmer.git.
  • Le registre Cargo privé s'appelle obi (https://forge.metabarcoding.org/api/packages/obi/cargo/).
  • Langue du projet et des documents générés : anglais (KIT_LANG ?= en). Licence : CeCILL-2.1.

Décisions déjà prises :

  • obikmer reste un workspace d'APPLICATION (Makefile non-crate incluant dev-patch.mk, comme pmomusic). Certaines crates génériques seront extraites plus tard en crates autonomes (sans workspace = true), publiées sur le registre obi. Candidates : obipipeline, obikrope, obicompactvec, obiread, obifastwrite, obitaxonomy (feuilles d'abord), puis obisys, obikseq ; obikentropy/obikalgorithm/obidebruinj à examiner. NE PAS extraire de crate dans cette session.
  • Les crates obikindex*, obikphylo, obikfilter, obikmerge, obikrebuild, obikquery, obikdump, obikselect, obikstats, obikidxcache, obiksession et le binaire obikmer restent dans le workspace d'application.
  • La CI de release actuelle (.gitea/workflows/release.yml : builds croisés macOS, images Docker) est conservée telle quelle.

À faire dans cette session (annoncer chaque étape avant de l'exécuter ; jamais de push, je pousse moi-même ; aucune commande VCS mutante sans demande explicite dans le tour, cd toujours en appel séparé) :

  1. Vérifier l'emplacement réel (pwd, git remote -v, jj git remote list) et corriger l'origine (git ET jj) pour pointer vers la nouvelle organisation obi, après m'avoir montré l'URL exacte. Mettre à jour les chemins dépendant de l'ancien emplacement : Makefile, .claude/, .serena/, .zed/, et signaler que la mémoire Claude du projet est indexée par chemin.
  2. Cloner/vérifier ../crate-kit dans obi/ ; lire kit/crate.mk, kit/dev-patch.mk, adopt.sh, adopt-kit.sh, docs/claude-config.md et le README (section « Writing an extension kit »).
  3. Préparer obi-kit (dépôt frère de crate-kit, calqué sur pmo-kit mais réduit au strict nécessaire) : overlay/kit/org.mk (REGISTRY ?= obi ; FORGE_URL ?= https://forge.metabarcoding.org ; REGISTRY_INDEX ?= sparse+$(FORGE_URL)/api/packages/$(REGISTRY)/cargo/ ; FORGE_TOKEN_FILE sous secrets/ gitignoré ; KIT_LANG ?= en), Makefile délégant à crate-kit, tools/kit-assemble.sh et kit-copy.sh, overlay/templates, README en anglais, .gitignore, LICENSE CeCILL-2.1. Pas de « kind » plugin ni de catalogue. Ne pas copier ce qui est propre à PMO.
  4. Installer crate-kit dans le workspace d'application obikmer au niveau Makefile (inclusion de dev-patch.mk, KIT_SRC ?= ../obi-kit), sans adopter les 26 crates ; ajouter license = "CECILL-2.1" et repository dans les Cargo.toml de l'application (absents aujourd'hui) ; LICENSE/LICENSE.en à la racine.
  5. Écrire la liste des risques Gitea à tester sur une crate jetable : version de Gitea et registre Cargo sparse, endpoints /api/v1 de forgejo-release.sh, wiki .wiki.git, secret FORGETOKEN, runner. Ne rien publier sans accord.
  6. Terminer par un rapport : fichiers créés/modifiés, ce qui reste à faire (création des dépôts obi-kit/crate-kit sur la forge, tests du pilote, premières extractions).

Règles du projet à respecter : CLAUDE.md d'obikmer et ~/.claude/CLAUDE.md (code existant = hypothèse, pas de substitution de dépendance, serena/rust-analyzer-mcp pour le code), documentation de DevDocMD en anglais.