feat(seed): Seed-Profile (seed --profile, timeouts.seedMs) - #4
Merged
Merged
Conversation
Contributor
Author
…just dev-seed) Der bisherige seed-Block bleibt als Profil "base" erhalten; weitere Profile liegen in seed.profiles (Konvention: "full" = komplette Test-Fixture, die Mynd nach dev-start und vor dev-auth einmal ausführt). profiles.base darf den Top-Level-Block ersetzen, beides zugleich ist ein Config-Fehler. - dev-contract seed [--profile <name>] wählt das Profil (Default base); unbekanntes Profil endet mit "[seed] unknown profile <name>" und Exit 1. - start seedet weiterhin nur base und überspringt, wenn keins konfiguriert ist. - timeouts.seedMs (Default 300 s) gilt je Seed für command und function; die 120 s aus runCommand waren für Fixtures zu knapp. Timeout-Diagnose nennt jetzt das Budget. - SeedOutput trägt "profile"; Timeouts werden beim Laden validiert. - README (Seeding, Commands, just-Rezept dev-seed, Consumer-Hinweis), Beispielconfig, Tests; Version 0.2.0 wegen neuer Config-Felder.
…null, Diagnose vor Guard) - Profil-Map ohne Prototyp + Object.hasOwn-Lookup: "toString" & Co. laufen nicht mehr als leeres Profil durch, ein Profil namens "__proto__" bleibt ein normaler Key. - seed --profile '' wird nicht mehr als "kein --profile" gelesen (unbekanntes Profil statt stillem base). - args: null fällt in der Config-Validierung durch (typeof null). - runSeed löst das Profil vor dem Deployment-Guard auf, damit ein Config-Tippfehler nicht hinter [guard] verschwindet. - hasSeedProfile/resolveSeedProfile exportiert; Tests für alle vier Fälle.
echo-ex-void
force-pushed
the
feat/seed-profiles
branch
from
September 14, 2026 14:21
62c091d to
7a252fe
Compare
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
Seed-Profile im CLI, passend zum Fleet-Contract
just dev-seed <profile>: Mynds Executor ruft künftig nachdev-startund vordev-autheinmaljust dev-seed full(5 min, ein Versuch, Fehler = Warnung). Repos, die das CLI nutzen, bekommen dasselbe überdev-contract seed --profile full.seed-Block (command/function/args) bleibt das Profilbase(abwärtskompatibel). Neuseed.profiles: Record<name, { command?, function?, args? }>;profiles.basedarf den Top-Level-Block ersetzen, beides zugleich ist ein Config-Fehler beim Laden.fullist die Konvention für die Test-Fixture. Profilnamen sind shell-sicher ([A-Za-z0-9_-]). Ein Block nur mitprofiles(ohnebase) ist erlaubt —startseedet dann nichts.timeouts.seedMs(Default 300 000) gilt je Seed fürcommandundfunction; bisher galten die 120 s ausrunCommand, das ist für Fixtures zu knapp.runConvexFunctionnimmttimeoutMsentgegen, die Timeout-Diagnose nennt das Budget ([timeout] killed after N ms). Alletimeouts.*werden beim Laden als positive Zahl validiert.dev-contract seed [--profile <name>](Defaultbase): unbekanntes Profil → Exit 1 mit[seed] unknown profile <name> (configured: …)auf stderr; letzte stdout-Zeile{ "ok": true, "profile": "full", "ran": ["command","function"] }.--profilebei einem anderen Befehl ist ein Fehler statt still ignoriert.dev-contract startseedet weiterhin nurbase(Aufruf jetzt explizitperformSeed(config, 'base')), überspringt mit Log, wenn keinbasekonfiguriert ist.performSeed(config, profile)ist strikt: fehlendes Profil (auch: kein seed-Block) ist ein[seed]-Fehler, kein stiller No-op. Resolved-Config-Form ist jetztseed.profiles(deshalb Minor-Bump);SeedOutput.profileneu;BASE_SEED_PROFILE,SeedProfile,SeedProfileConfigexportiert.just dev-seed-Rezept, Consumer-Hinweis für Mynd),devcontract.config.example.json, Version 0.2.0.Tests
pnpm run cilokal grün (prettier, eslint, tsc, cspell, vitest — 97 Tests).profiles,profiles.baseals Ersatz, profiles-only, Konflikt, ungültige Profilnamen/Profile, Timeout-Validierung;performSeedwählt das Profil, unbekanntes Profil läuft nichts,seedMswird anrunCommandundrunConvexFunctiondurchgereicht;runStartseedet nurbasebzw. überspringt ohnebase;runSeed --profile full, unbekanntes Profil ohne seed-Block.seed --profile nightly→[seed] unknown profile nightly (configured: base, full), Exit 1;seed --profile full/seed→ korrekte JSON-Zeile;start --profile full→ Fehler; Konflikt-Config →[config]-Fehler.Follow-ups
pnpm run release:minornach dem Merge) und Bump in den CLI-Nutzern (z. B. ki-at-obv) inkl.dev-seed-Rezept im justfile.just dev-seed fullzwischen dev-start und dev-auth aufrufen (separater PR in mynd).The PR appears safe to merge; the previous findings are fully addressed and no new actionable failures remain.
Summary
startruns only the optionalbaseprofile between provisioning and login.timeouts.seedMsbudget.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[CLI loads and resolves config] --> B{Command} B -->|start| C[Backend ready and provisioned] C --> D{Base profile configured?} D -->|Yes| E[Run base seed] D -->|No| F[Skip seeding] E --> G[Start app and verify login] F --> G B -->|seed --profile name| H[Resolve requested profile] H -->|Unknown| I[Seed error] H -->|Configured| J[Validate development deployment] J --> K[Run command with seedMs timeout] K --> L[Run Convex function with seedMs timeout] L --> M[Emit profile and ran result]Reviews (2) · Last reviewed commit: "Seed-Profile: Greptile-Findings (eigene ..."