Skip to content

job: report a plan fingerprint and refuse a changed plan with --expect-plan - #159

Draft
DLANSAMA wants to merge 2 commits into
mainfrom
claude/project-thread-ha5s9e
Draft

DLANSAMA wants to merge 2 commits into
mainfrom
claude/project-thread-ha5s9e

Conversation

@DLANSAMA

@DLANSAMA DLANSAMA commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What and why

job and send now put a plan_fingerprint in every envelope (dry-run, success, failure): a SHA-256 over the printer serial and model, the source, the content of a local source file, and every slicing and print-start option. Passing a reviewed dry run's fingerprint as --expect-plan makes the real run exit 5, before any download, slice, upload or print, if anything changed.

Why: --confirm is only an accident gate, because anything that can run plate can pass it. This lets a caller prove "what runs is what was reviewed".

Limits, stated in SECURITY.md, docs/api.md and the manual:

  • It does not prove a person reviewed the plan; an agent can run the dry run itself.
  • A URL source is bound to the URL, not to the bytes it serves later.

Changes: new bambu_cli/job/plan.py, --expect-plan in cliparse.py, the check in job/orchestrate.py (before any step), plan_fingerprint on the JobOk/JobError contracts with regenerated schemas, tests in tests/test_job_plan.py, docs and CHANGELOG.

Checklist

  • uvx ruff check bambu_cli
  • uvx ruff format --check bambu_cli
  • uvx mypy -p bambu_cli
  • uvx --from 'bandit[toml]' bandit -c pyproject.toml -r bambu_cli -ll (exit 0)
  • uv run python -m pytest tests/ -q -m "not live": 2242 passed, coverage 93.57% against the 92 floor
  • python_compat, ci_workflow, agent_cli, privacy smokes pass; gen_schemas --check and check_layers pass
  • Not run here: package_contents_smoke (needs a built dist; CI builds one). No printer was contacted.

Generated by Claude Code

…t-plan

job and send now put a plan_fingerprint in every envelope: a SHA-256 over the printer
serial and model, the source, the content of a local source file, and every slicing
and print-start option. Passing a reviewed dry run's fingerprint as --expect-plan makes
the real run exit 5, before any download, slice, upload or print, if anything changed.
It shows the run is the reviewed one; it does not show a person reviewed it, and a URL
is bound to the URL rather than the bytes it serves later.
@DLANSAMA DLANSAMA self-assigned this Nov 7, 2026
# Conflicts:
#	CHANGELOG.md

This branch has not been deployed

No deployments
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