Single-file fleet profiles with inline workload definitions#13
Merged
Conversation
Thin orchestrator approach: fleet profile references existing workload profiles, randomly assigns bad actors, generates N archives via existing ArchiveWriter. No overlay engine needed.
…ationship Fix PYTHONHASHSEED reproducibility issue (use hashlib not hash()), document per-host WorkloadProfile construction via dataclasses.replace(), enumerate ratio vs throughput fields for jitter clamping, add Phase 3 spec supersession note, clarify --validate incompatibilities.
5 chunks, 6 tasks: jitter module, fleet profile parsing, host assignment, manifest writer, generation orchestrator, CLI wiring, and documentation updates. TDD throughout.
Threads avoid pickling issues with closure-based _generate_one. PCP archive writing is I/O-bound so GIL isn't a bottleneck. Default --jobs to CPU count.
Pure function multiplies all stressor values by a factor, clamps ratios to [0,1] and throughput fields to >=0. No mutation.
Fleet YAML loader with dataclasses, path resolution relative to fleet file, deterministic host assignment via SHA-256 seeding.
YAML manifest records all host assignments with roles and jitter factors. Override warnings emitted once per unique workload profile.
Loops over host assignments, loads workload profiles with fleet-level overrides (hostname, duration, interval, hardware), applies jitter, and calls ArchiveWriter per host with optional parallelism via --jobs.
Replaces the Phase 3 stub with a fully functional fleet subparser. Supports --validate, --dry-run, --seed, --jobs, --force, --start.
Fleet subcommand is now implemented — update project docs to reflect the new capability and remove reservation notes.
460-line God Object decomposed into 7 focused modules: - models.py: dataclasses - loader.py: YAML parsing & validation - assignment.py: host assignment & stable seeding - orchestrator.py: archive generation - manifest.py: fleet.manifest writer - warnings.py: override conflict detection - display.py: dry-run output __init__.py re-exports all public symbols for backwards compatibility. All 510 tests pass, no consumer changes needed.
Replace old /generate-profile slash command with proper SKILL.md skills that bundle the full schema as reference context. New fleet skill enables natural-language generation of multi-host fleet profiles with bad actors.
Both skills now run `uv sync` + `uv run pmlogsynth` to validate AND generate the actual PCP archives. Shared bootstrap reference extracted to references/running-pmlogsynth.md for both skills.
Add Claude Code skills for profile and fleet generation
Prepare models for single-file fleet profiles: add InlineProfile dataclass, remove baseline_path/profile_paths/workload_path fields that referenced external files.
Convert fleet profile format from multi-file (external workload YAML references) to single-file (inline named profiles). Fixture, loader, and tests updated atomically.
HostAssignment no longer carries workload_path — workload_rel is the profile name referencing the fleet's inline profiles dict.
Orchestrator constructs workload YAML from fleet.profiles entries and fleet-level meta, then feeds it through WorkloadProfile.from_string(). Warnings module becomes no-op since inline profiles can't conflict.
Add InlineProfile to fleet package exports. Replace override warning tests with single no-op verification since inline profiles can't conflict.
Remove unused imports from orchestrator. Create standalone jitter test fixture since the old fleet/baseline.yaml was deleted.
Skill now generates one self-contained YAML file with inline workload profiles instead of coordinating multiple files.
README, man page, and profile-format.md now describe the self-contained fleet YAML format with inline named workload definitions.
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
profilestop-level section for named inline workload definitionshosts.baselineandbad_actors.profilesnow reference profile names instead of file pathsMotivation
Fleet profiles previously required 3+ files (fleet YAML + separate workload YAML files). This made them non-portable and harder to grok. A single self-contained file is easier to share, review, and understand.
Test plan
pmlogsynth fleet --validatewith new formatpmlogsynth fleet --dry-runshows correct host assignments🤖 Generated with Claude Code