Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ regression plans and physical-print evidence. It is designed to work with
desktop slicers already installed by the user, beginning with Bambu Studio and
later OrcaSlicer.

The first development milestone can:
The current pre-alpha milestone can:

- discover a local Bambu Studio or OrcaSlicer executable;
- report the detected slicer version without using a cloud account;
- fingerprint an STL or 3MF input;
- produce an inspectable, shell-free Bambu Studio slicing command;
- emit a JSON plan that can become part of a reproducible regression report.
- emit a JSON plan that can become part of a reproducible regression report;
- execute one explicitly approved slice in a new isolated directory;
- record a portable run manifest, output hashes, and a redacted slicer log.

OpenPrintBench does not upload models, control printers, use Bambu Cloud,
request access tokens, or load proprietary network plugins.
Expand All @@ -23,8 +25,9 @@ request access tokens, or load proprietary network plugins.

## Status

Pre-alpha. The current code creates and validates slicing plans; it does not
yet execute a slice or claim physical-print validation. See
Pre-alpha. A run requires an explicit `--approve` flag and a fixture with pinned
source and license provenance. The project does not claim physical-print
validation. See
[the roadmap](docs/ROADMAP.md), [daily progress log](docs/PROGRESS.md), and
[evidence-gated promotion plan](docs/PROMOTION.md).

Expand Down Expand Up @@ -68,6 +71,39 @@ uv run openprintbench plan \
The generated command is an argument array. OpenPrintBench does not construct
or execute a shell string.

Execute an isolated run only after reviewing the plan and fixture provenance:

```bash
uv run openprintbench run \
--input fixtures/cube-20mm.stl \
--run-dir /tmp/openprintbench-run-001 \
--machine-settings path/to/machine.json \
--process-settings path/to/process.json \
--filament-settings path/to/filament.json \
--profile-root path/to/installed/profiles/BBL \
--profile-source-url \
https://github.com/bambulab/BambuStudio/tree/FULL_COMMIT/resources/profiles/BBL \
--profile-source-commit FULL_COMMIT \
--profile-license AGPL-3.0-only \
--fixture-source-url \
https://github.com/kforris/OpenPrintBench/blob/FULL_COMMIT/fixtures/cube-20mm.stl \
--fixture-source-commit FULL_COMMIT \
--fixture-license CC0-1.0 \
--approve
```

The run directory must not already exist. OpenPrintBench gives the slicer a
private `HOME` and temporary directory, removes secret-like environment
variables, captures stdout/stderr into a redacted log, and fingerprints regular
files under the isolated output directory. For STL inputs, it resolves the
installed Bambu profile inheritance into complete private run-local JSON files
and records both source and materialized hashes. Generated 3MF/G-code remains
local and must not be committed.

See the first
[repeatability evidence](docs/evidence/2026-07-28-bambu-stl-repeatability.md)
for two runs using the project-authored CC0 cube fixture.

## Development

```bash
Expand Down
26 changes: 25 additions & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,31 @@ The Python package currently contains:
- `slicers/` — slicer-specific command construction;
- `fingerprint.py` — streaming SHA-256 file fingerprints;
- `plan.py` — portable JSON plan assembly;
- `cli.py` — user-facing `doctor` and `plan` commands.
- `profiles.py` — pinned, local Bambu profile inheritance materialization;
- `run.py` — explicit approval, isolated process execution, output
fingerprinting, and privacy-reviewed run manifests;
- `cli.py` — user-facing `doctor`, `plan`, and `run` commands.

Slicers are executed as separate local processes using argument arrays.
OpenPrintBench does not link to, embed, or redistribute slicer code.

## Run isolation

Execution is opt-in and creates a new run directory. The slicer receives that
directory as its working directory, a private `HOME`, a private temporary
directory, and an environment with secret-like variables removed. Existing run
directories are rejected to avoid mixing evidence.

The run manifest uses placeholders instead of machine-local paths. It records
the full fixture source commit and license, input/settings hashes, slicer
version, start time, duration, exit status, timeout state, output hashes, and
the hash of a redacted log. It sets `state` to `executed` and keeps
`physical_validation` null; a successful process does not imply a physical
print.

For a bare STL, Bambu Studio's CLI needs complete machine, process, and
filament configuration. OpenPrintBench recursively resolves `inherits` and
`include` references from a user-installed profile tree, then writes complete
profiles inside the private run directory. The source tree commit, license,
leaf hashes, materializer version, and resulting hashes are recorded. Profile
source files and generated slicer outputs are never added to the repository.
110 changes: 102 additions & 8 deletions docs/PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ instead of manufacturing activity.
- Kept X/Twitter cadence at no more than two original milestone posts or
threads per week and excluded automated likes, follows, reposts, quote-posts,
private messages, and generic engagement.
- Added the first redistributable fixture: a project-authored 20 mm ASCII STL
cube released under CC0-1.0, with a sidecar license and pinned SHA-256.
- Implemented the explicitly approved Bambu Studio executor linked to Issue
#1. It uses an argument array with `shell=False`, a new private run
directory, isolated `HOME`/temporary paths, secret-like environment removal,
a bounded timeout, redacted logging, and portable evidence manifests.
- Added a local profile materializer because Bambu Studio CLI requires complete
machine/process/filament settings rather than installed leaf profiles.
Source commit/license, leaf hashes, materializer version, and resulting
profile hashes are recorded without redistributing the profiles.
- Completed two successful Bambu Studio `02.06.00.51` digital slices with the
same fixture and settings. Both exited `0`; the G-code SHA-256 was identical.
Start time, duration, log timestamps, timing fields in `result.json`, and the
3MF container hash varied. No generated 3MF/G-code was committed and no
physical-print claim was made.
- Audited GitHub and the authorized `@kforris_w` X account before development.
Issue #1 was the only open repository item; there were no open PRs, relevant
X mentions, or OpenPrintBench search results. No X reply or post was needed.

### Evidence

Expand All @@ -72,25 +90,45 @@ instead of manufacturing activity.
- P0 draft: `docs/promotion/P0_BUILDING_IN_PUBLIC.md`
- X destination: <https://x.com/kforris_w>
- Public baseline CI remains green:
<https://github.com/kforris/OpenPrintBench/actions/runs/30328095151>
<https://github.com/kforris/OpenPrintBench/actions/runs/30328367492>
- Fixture SHA-256:
`369c23daac96f4cde40ec6a0e13afb9be5ec4cbbf974c071c60f1009824477c4`
- Bambu profile source:
`b506005bc4ee62124e24bf00e0f58656db3646a6` (`AGPL-3.0-only`)
- Repeatability record:
`docs/evidence/2026-07-28-bambu-stl-repeatability.md`
- Run 1: duration `0.650262` seconds, exit `0`, G-code SHA-256
`f6c6365d65ecf1110f4aefd1097558378006ad4f1738648fba74c0bfa95205c5`.
- Run 2: duration `0.472667` seconds, exit `0`, G-code SHA-256
`f6c6365d65ecf1110f4aefd1097558378006ad4f1738648fba74c0bfa95205c5`.
- Local validation after implementation: Ruff lint/format, mypy, 45 tests,
0 skipped/xfail, 87.38% branch coverage, package build, and
`git diff --check` passed.
- Functional PR: <https://github.com/kforris/OpenPrintBench/pull/2>
- PR CI (Python 3.11, 3.12, and 3.13):
<https://github.com/kforris/OpenPrintBench/actions/runs/30368257211>
- No public release exists yet.

### Blockers

- No functional PR has been opened or merged yet, so the P0 publication gate is
not met.
- No redistributable STL/3MF fixture has been selected yet.
- The first functional PR is not merged and its `main` CI gate is not yet
satisfied, so P0 publication remains blocked.
- Only one of the ten required redistributable fixtures is complete.
- The target Bambu printer model is not yet recorded.
- OrcaSlicer is not installed locally and no verified CI fixture is available.

### Next

1. Select the first open fixture and implement the isolated Bambu Studio
execution path in a functional PR linked to Issue #1.
1. Review the functional PR linked to Issue #1 and merge only after its CI is
green; then verify the resulting `main` CI.
2. After that PR is merged and `main` CI is green, create and verify the P0
visual, refresh the exact post copy, and publish through the authorized X
account.
3. Check GitHub issues/PRs and relevant X replies before selecting daily work;
3. Add the next license-clear fixture or generator without weakening the
provenance gate.
4. Check GitHub issues/PRs and relevant X replies before selecting daily work;
reply with evidence after changes and close only resolved GitHub issues.
4. Measure public repository and X signals 24 and 72 hours after the first
5. Measure public repository and X signals 24 and 72 hours after the first
post.

## 2026-07-29
Expand Down Expand Up @@ -147,3 +185,59 @@ instead of manufacturing activity.
4. When the P0 gate is satisfied, refresh the exact copy and metrics, create
and inspect the evidence-backed 1600x900 visual, then publish and verify the
authorized two-post thread.

## 2026-07-30

### Completed

- Refreshed the public repository before selecting work. `origin/main` was
`2e61c5c29d7522d4aa4be8dcf6afdb563bde8121`; Issue #1 and PR #2 remained
open, with no new review, review comment, issue comment, or external
contribution.
- Found PR #2 had changed from mergeable/clean to conflicting/dirty after the
2026-07-29 progress-only commit modified `docs/PROGRESS.md` on `main`.
- Selected one bounded unblocker instead of opening a second implementation
PR: merged the latest `origin/main` into the existing PR branch and resolved
the progress-log conflict without dropping either day's verified record.
- Verified the existing Comet X session was logged in as `@kforris_w`. The
mentions view was empty and an exact latest search for `OpenPrintBench`
returned no results after one retry. No private message was inspected and no
X reply or post was made.

### Evidence

- Open Issue #1: <https://github.com/kforris/OpenPrintBench/issues/1>
- Open PR #2: <https://github.com/kforris/OpenPrintBench/pull/2>
- Pre-resolution PR state: `CONFLICTING` / `DIRTY` at
`817e8a7c8fb7c21264fead9229d277d3da55b6e2`, with no reviews or comments.
- Previous PR CI:
<https://github.com/kforris/OpenPrintBench/actions/runs/30368347793>
- Latest baseline `main` CI:
<https://github.com/kforris/OpenPrintBench/actions/runs/30459104729>
- Local validation after conflict resolution: `uv lock --check`, Ruff
lint/format, mypy, 45 tests with 0 skipped/xfail and 87.38% branch coverage,
package build, and `git diff --check` passed.
- Public repository snapshot: 1 star, 0 forks, no tags, and no releases.

### Blockers

- PR #2 is still unmerged and requires review/merge; its resulting green
`main` CI does not yet exist, so Issue #1 cannot be closed.
- The P0 visual and two-post thread remain blocked on the merged functional PR
and resulting green `main` CI.
- The target Bambu printer model, material, and human observation remain
unavailable; no physical validation is claimed.
- OrcaSlicer is not installed locally, and nine additional redistributable
fixtures or generators remain to reach the v0.1 fixture target.

### Next

1. Verify the updated PR branch CI and mergeability, then wait for real review
and merge without self-merging.
2. After PR #2 is merged, verify the resulting `main` CI, update and close
Issue #1 with durable evidence, and mark only the proven roadmap items.
3. When the P0 gate is satisfied, refresh the exact copy and metrics, create
and inspect the evidence-backed 1600x900 visual, then publish and verify the
authorized two-post thread.
4. Add the next license-clear fixture or generator only after the current
implementation PR is no longer blocking the one-topic workflow.
7 changes: 4 additions & 3 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ requirements and do not guarantee acceptance into any support program.
- [x] Probe Bambu Studio version and supported command-line options.
- [x] Produce a deterministic, shell-free slice plan.
- [x] Fingerprint source models with SHA-256.
- [ ] Execute an explicitly approved Bambu Studio slice in an isolated run
directory.
- [ ] Capture duration, exit status, output hashes, and a redacted log.
- [x] Execute an explicitly approved Bambu Studio slice in an isolated run
directory. See the
[2026-07-28 evidence](evidence/2026-07-28-bambu-stl-repeatability.md).
- [x] Capture duration, exit status, output hashes, and a redacted log.
- [ ] Add an OrcaSlicer execution adapter after local installation or a
verified CI fixture is available.
- [ ] Publish at least ten redistributable test fixtures or generators.
Expand Down
76 changes: 76 additions & 0 deletions docs/evidence/2026-07-28-bambu-stl-repeatability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Bambu STL repeatability evidence — 2026-07-28

This record covers two local, explicitly approved digital slicing runs. It
does not claim a physical print, printer control, cloud access, or hardware
validation.

## Provenance

- OpenPrintBench fixture commit:
`2d2c54e9d9ddc53a365606b9d9d070b94caeb64c`
- Fixture: `fixtures/cube-20mm.stl`, project-authored, `CC0-1.0`
- Fixture SHA-256:
`369c23daac96f4cde40ec6a0e13afb9be5ec4cbbf974c071c60f1009824477c4`
- Fixture size: `1517` bytes
- Slicer: Bambu Studio `02.06.00.51`
- Installed profile source commit:
`b506005bc4ee62124e24bf00e0f58656db3646a6`
- Installed profile source license: `AGPL-3.0-only`
- Materializer: `openprintbench-bambu-profile-merge-v1`
- Machine: `Bambu Lab X1 Carbon 0.4 nozzle.json`
- Process: `0.20mm Standard @BBL X1C.json`
- Filament: `Generic PLA.json`

The selected profile files were used only as local inputs. Their inheritance
was materialized into the isolated run directory; neither those profiles nor
generated 3MF/G-code files are stored in this repository.

## Captured development attempts

Before the two successful runs, the executor captured two non-success states
without producing output files:

- Installed leaf profiles were passed directly: duration `0.278480` seconds,
exit status `-11` (signal 11), redacted log SHA-256
`f1de4e2a8b778b70ef41d56836046f5e73b8e07aa756e46471a11e3850dcc3fc`.
This led to the complete-profile materializer.
- Materialized profiles were used with an incomplete orientation argument:
duration `0.070092` seconds, exit status `254`, redacted log SHA-256
`5a9942777f3bb22d04188093b67f318b551a4b09ad90b9430f289b1aeb410a8d`.
The argument was corrected to the documented `--orient 1` form.

Both manifests retained `physical_validation: null`.

## Run results

| Field | Run 1 | Run 2 | Classification |
| --- | --- | --- | --- |
| Exit status | `0` | `0` | stable |
| Timed out | `false` | `false` | stable |
| Duration (seconds) | `0.650262` | `0.472667` | expected variable |
| G-code size (bytes) | `278335` | `278335` | stable |
| G-code SHA-256 | `f6c6365d65ecf1110f4aefd1097558378006ad4f1738648fba74c0bfa95205c5` | same | stable |
| 3MF size (bytes) | `55621` | `55621` | stable |
| 3MF SHA-256 | `57ce07f1176c466cd20a97908038a5c3a8d167937eec796544bb73750d0d3c9d` | `146dcd84ea9ed468ca52abc8e8149d1d44b4310445dd341d71aa9b126f6bab31` | variable container bytes |
| `result.json` SHA-256 | `d97fc5b7900c937e64bfb114a26089fa0196ec79dbfbb7210147baed2dbcb547` | `17cee9b309239fe0dc6a74681a76f73ca936f58e1aec10d53047a1ccdf591e23` | variable timing fields |
| Redacted log SHA-256 | `5d701094d4e0cd5535a456dd9c28b1923070f83a007eeee9b055e0e59c41429e` | `25fa3d3424d53cddee09f9dd3a0330000908a9fd6d01b9be5956b1c3586f3550` | variable timestamps |
| Physical validation | `null` | `null` | not performed |

## Stable inputs and settings

The portable command array, fixture hash, slicer version, source profile
hashes, materialized profile hashes, output names, approval state, and exit
status matched across both runs. In particular:

- materialized machine SHA-256:
`b5a60ef9b156acce52fa5b083595af1a00d7c478ccdc05f1b7f4e59b5e6c6a7b`
- materialized process SHA-256:
`5d6ec0717d02b0293d45798d3c776d141e6a3f03876ee519863028de6b992039`
- materialized filament SHA-256:
`2ee424b81096dbdf4f6c8e09a7f7f46a840a5b44fa857db19c290871ff2c67b8`

The differing `result.json` fields were execution-time measurements such as
`export_time`, `prepare_time`, perimeter/infill time, and total sliced time.
The redacted logs differed at timestamp positions. The matching G-code hash is
the strongest byte-level repeatability result from these two runs; the varying
3MF container hash must not be treated as a slicing regression by itself.
18 changes: 18 additions & 0 deletions fixtures/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Redistributable fixtures

`cube-20mm.stl` is an original, deterministic ASCII STL created for
OpenPrintBench. It contains a 20 mm cube represented by 12 triangles and is
dedicated to the public domain under CC0-1.0. Its adjacent `.license` file is
the authoritative redistribution notice.

For an evidence run, pin the fixture to the full Git commit that contains the
exact bytes and use:

- source URL:
`https://github.com/kforris/OpenPrintBench/blob/<commit>/fixtures/cube-20mm.stl`
- source commit: the same full 40-character Git SHA;
- license: `CC0-1.0`;
- input SHA-256: calculated by OpenPrintBench at execution time.

The fixture is digital test geometry only. Its presence does not imply that a
slice has run or that a physical print has been validated.
Loading