Skip to content

feat: add tool-metadata.json and multiplex.json - #7

Merged
k-rister merged 2 commits into
mainfrom
feat-tool-metadata
Aug 28, 2026
Merged

feat: add tool-metadata.json and multiplex.json#7
k-rister merged 2 commits into
mainfrom
feat-tool-metadata

Conversation

@k-rister

Copy link
Copy Markdown
Contributor

Summary

  • Adds tool-metadata.json: description and CDM indexing status for tool-mlxreg's mlxreg metric source, enumerating power-watts metric types and output artifacts (mlxreg-data/<device>.csv.xz, mlxreg-pid.txt, mlxreg-start-stderrout.txt, mlxreg-stop-stderrout.txt).
  • Adds multiplex.json: validations for devices, sensors, and interval, plus a defaults preset reproducing mlxreg-start's bash defaults (sensors="1,2,6,127", interval="2") required for empty parameter sets.
  • Reference implementation for crucible#653, consumed by crucible tools list (crucible#654 / crucible#655).
  • Adds canonical AGENTS.md and CLAUDE.md (@AGENTS.md) per the agent instructions convention.

Test plan

[✓] Validated tool-metadata.json against crucible/schema/tool-metadata.json with jsonschema.validate()
[✓] Validated multiplex.json against multiplex/JSON/req-schema.json with jsonschema.validate()
[✓] Live-tested multiplex.json against multiplex.py --flat:

  • Empty params []defaults preset backfills sensors="1,2,6,127", interval="2"
  • Explicit valid params (devices="0000:b5:00.0,0000:c3:00.0", sensors="1,2", interval="5") round-trip unchanged
  • Invalid sensors (invalid) correctly rejected with EC_VALIDATIONS_FAIL (rc=4)
    [✓] Verified syntax of mlxreg-post-process with py_compile.

@k-rister k-rister self-assigned this Aug 26, 2026
@k-rister
k-rister requested a review from a team August 26, 2026 20:27
@project-crucible-tracking project-crucible-tracking Bot moved this to In Progress in Crucible Tracking Aug 26, 2026
@k-rister

Copy link
Copy Markdown
Contributor Author

PR Review: tool-mlxreg#7 — feat: add tool-metadata.json and multiplex.json

Summary: Adds tool-metadata.json and multiplex.json reference-implementation metadata for the mlxreg tool (consumed by crucible tools list / multiplex parameter expansion), plus AGENTS.md/CLAUDE.md/.gitignore scaffolding.
Changed files: 5
Review dimensions: Correctness, API & Contracts, Build & Deploy, Documentation, Style, Completeness

Documentation

  • [README.md:158-165] --sensors default documented as 1,2,6, but the new multiplex.json defaults preset (and the pre-existing mlxreg-start script default) is 1,2,6,127. The README's parameter table and the "Active Power Sensors (Default Collection: 1,2,6)" heading both omit sensor 127. This mismatch predates the PR at the script level, but this PR is what makes 1,2,6,127 the canonical, tool-facing default surfaced through crucible tools list and multiplex-driven runs, so the contradiction with the README becomes user-visible now.

File Coverage

  • .gitignore — No issues found (matches ebpf-dpdk's __pycache__//*.pyc convention)
  • AGENTS.md — No issues found (matches convention, accurately describes new files)
  • CLAUDE.md — No issues found (bare @AGENTS.md import, correct per convention since no Claude-specific content is needed)
  • multiplex.json — No issues found (validates against req-schema.json; regexes correctly mirror mlxreg-start's own validation for devices/sensors/interval; defaults preset matches script defaults; format matches sibling tools exactly)
  • tool-metadata.json — 1 doc issue (README default mismatch above; otherwise validates against schema/tool-metadata.json, tool field matches rickshaw.json, single cdm_sources entry power-watts matches what mlxreg-post-process actually emits)

Limitations

Did not runtime-test multiplex.py --flat against these files (relied on the PR's stated test plan); did not verify crucible tools list rendering end-to-end.

Verdict

Approve with comments — the implementation is a clean, schema-compliant match to every sibling tool's reference implementation; the only finding is a non-blocking pre-existing README default-value discrepancy that the author can fix at their discretion.

🤖 Generated with Claude Code

@k-rister

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback in commit 7be5511:

  • Updated README.md to align the --sensors default documentation with the mlxreg-start script and multiplex.json presets (1,2,6,127), and documented sensor index 127 (TOT PWR / total board power) in the Active Power Sensors table.

@k-rister
k-rister merged commit a22c6dd into main Aug 28, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Crucible Tracking Aug 28, 2026
@k-rister
k-rister deleted the feat-tool-metadata branch August 28, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants