Skip to content

Single-file fleet profiles with inline workload definitions#13

Merged
tallpsmith merged 24 commits into
mainfrom
feature/fleet-mode
Mar 21, 2026
Merged

Single-file fleet profiles with inline workload definitions#13
tallpsmith merged 24 commits into
mainfrom
feature/fleet-mode

Conversation

@tallpsmith
Copy link
Copy Markdown
Owner

@tallpsmith tallpsmith commented Mar 20, 2026

Summary

  • Replace multi-file fleet profiles with a single self-contained YAML format
  • Add profiles top-level section for named inline workload definitions
  • hosts.baseline and bad_actors.profiles now reference profile names instead of file paths
  • Orchestrator builds WorkloadProfile in-memory from inline data (no disk reads)
  • Override warnings simplified to no-op (inline profiles can't conflict with fleet meta)
  • Update generate-fleet-profile skill, docs, and man page for new format

Motivation

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

  • 29 fleet unit tests passing (loader, assignment, manifest, warnings, dry-run)
  • 5 fleet integration tests passing (orchestrator with mocked PCP)
  • 9 jitter tests passing (with new standalone fixture)
  • Full pre-commit gate green (508 unit/integration + 7 E2E)
  • mypy strict, ruff clean
  • Manual: pmlogsynth fleet --validate with new format
  • Manual: pmlogsynth fleet --dry-run shows correct host assignments
  • Manual: End-to-end fleet generation produces valid PCP archives

🤖 Generated with Claude Code

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.
@tallpsmith tallpsmith changed the title Add fleet mode for multi-host archive generation Single-file fleet profiles with inline workload definitions Mar 21, 2026
@tallpsmith tallpsmith merged commit e469019 into main Mar 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant