A filament_id is now exactly what the preset's own filament_vendor,
filament_type and filament name mint, wherever it inherits from. Inheriting
settings no longer limits what a preset may claim, so the checks that policed
inheritance are gone, and so are the four grandfather lists that held thousands
of presets as permanent exceptions. The snapshot records sanctioned state rather
than excuses: one entry per id, carrying the product it names beside the presets
claiming it.
Profiles that disagreed are corrected instead of excused. The Elegoo TPU and
PAHT roots were named for a different product than all of their variants and
become TPU 95A and PAHT-CF; Elegoo PET-CF gains the filament_type its variants
already set; the Snapmaker breakaway support presets get an id of their own
rather than riding the PVA chain; and a BBL preset name carrying a doubled space
is fixed behind renamed_from. Their ids re-mint from the corrected identities.
The tooling and the design note also drop the word "family", which invited
reading a brand's Lite and Pro spools as one id.
No change to slicing output — only filament_id values, three preset names, the
inherits lines following those renames and the vendor indexes move.
Orca content-addresses every system filament, Bambu's included, but a printer,
its AMS and its vendor's cloud know only that vendor's own catalog ids. The
printer agent now translates between the two: outbound MQTT and FTP traffic, the
AMS mapping sent with a print job, and the ids written into a 3mf bound for the
printer all leave in the printer's own ids, while status messages, loaded
projects and SD-card prints arrive in Orca's. An id with no mapping passes
through unchanged, and an agent whose printers already speak Orca's ids
translates nothing at all.
Bambu's map is generated from BambuStudio's own shipped bundle; a missing or
unreadable file leaves every lookup an identity rather than taking the app down.
The profile check validates the map's shape, and profile CI now runs on the paths
that can change it. docs/HLSD/filament_id.md records the places the map
deliberately does not reach.
Every vendor's filament_id declarations, Bambu's own bundle included, are now
minted and checked the same way: the GF* catalog space is reserved but
ownerless, format is validated unconditionally with no snapshot or BBL
exemption, and both --remint and the default assign pass treat a non-OF
declaration as one needing a fresh mint (so a future BambuStudio sync
self-heals instead of needing a manual pass). A new check validates
resources/printers/bambu_filament_ids.json against the tree it describes:
that it parses, carries its header, keys only OF ids, maps each Bambu id once,
and agrees with the tree on every product it shares. The redundant BBL/OFL
carve-out in the profile checker's length check is dropped too, so it runs
the same way for every vendor.
The BBL bundle itself hasn't been touched yet and still declares its old GF
ids, so TestRealTree.test_shipped_snapshot_matches_tree is expected to fail
here (209 declarations flagged) until the next commit re-mints the bundle
onto OF ids.
scripts/update_bambu_filament_ids.py derives resources/printers/bambu_filament_ids.json
from BambuStudio's own shipped BBL bundle (cloned from upstream, or read from a local
checkout via --bambustudio-dir), pairing each Bambu catalog id with the Orca filament_id
we already ship for that product where we ship one, else a freshly generated one. Nothing
reads the map yet; later work uses it to translate ids at the Bambu printer boundary.
All 264 QD_* declarations re-derive from their family triples via
--remint Qidi. Only 8 family ids are new: most QIDI-brand products already
carried v3.2-minted ids on older printer series, so the QD-series
declarations converge onto them (QD_0..4_1_1 -> OFKIQO2W "QIDI PLA
Rapido"), and the six Generic families converge onto the shared generic
ids (Generic PLA -> OFDSrzZ8 etc.) by triple math -- no inherits or
compatible_printers changes anywhere.
--update-snapshot retires all 204 QD_* ids with mode-rule successors.
Audit: 204/204 non-null successors, every chain ends at a live id; the
four ids hardcoded in QidiPrinterAgent's non-numeric-series fallback
resolve to the OFL generics (QD_1_0_1 -> OFDSrzZ8, ...). The v4.1 agent
hook translates device-composed QD_* ids through these entries at
runtime, so box behavior is preserved on updated clients.
Known accepted residue (plan v4 SS4): three case/spelling family splits
keep distinct ids for one product line each -- QIDI PC-ABS-FR (series
1-2) vs QIDI PC/ABS-FR (series 3-4) vs Qidi PC-ABS-FR (X-Plus 4), and
QIDI TPU 95A-HF vs Qidi TPU 95A-HF. Renames are ruled out; the ledger's
per-series successors keep each device slot resolving to the right
presets, and a future upstream name unification self-heals through
content addressing.
The code<->ledger lockstep test is now active (un-skipped).
Gates: --check 0; orca_extra_profile_check 0/0; 117 script tests OK
(0 skipped); validator base, -f tree-wide, -v Qidi all exit 0;
libslic3r_tests green; Qidi profile diff is filament_id-value-only.
Qidi.json version bumped.
- is_island_declaration: only BBL remains an island; Qidi QD_* declarations
now enter the triple bookkeeping (checks 3 and 8, --remint's domain).
- reserved_space_owner: QD_* stays reserved but ownerless -- no vendor may
declare it, --update-snapshot refuses new QD_* ids outright, and vanished
QD_* ids take the retired-with-successor path instead of the island
release-with-hint path. New reserved_space_desc() names the space in
check 6 / sanction-gate messages.
- Check 1 drops the vendor-Qidi QD_* format exemption; --add-hint now
refuses QD_* keys (island space is GF* only); docstrings updated.
- Snapshot regenerated: the 204 QD_* declarer triples are now recorded
(declared triples 1113 -> 1317); ids/claims unchanged.
- Tests updated for the flip; new (skipped until v4.2b) lockstep test
asserting the QidiPrinterAgent fallback QD_* literals stay retired
ledger keys chaining to live ids.
Tree state is untouched: presets still declare their QD_* ids, all
grandfathered by the snapshot. --check exit 0; 117 script tests OK.
Every remaining legacy filament_id outside the BBL/QD_* islands re-derives
from its product triple (filament_vendor / filament_type / family name),
completing the content-addressed id model of filament_id_plan_v3.md:
- Relocation pre-step: 14 fdm_filament_* template forks (Cubicon x3,
Prusa x6, RH3D x6 minus the pc fork already re-homed) stop declaring
ids; the 16 presets that rode Prusa's forks now declare the id they
already resolved (verified zero effective-id drift over all 5892
instantiated presets).
- --drop-redundant-ids: 6 Custom/MyToolChanger generics drop copied GF
ids and ride their OFL families.
- --remint over all 62 non-island vendors: 2647 declarations re-derived;
identical products converge cross-bundle (showcase: PolyLite PLA is now
OF5CgdDq in OrcaFilamentLibrary, Qidi, OrcaArena and Snapmaker).
- Prusament @XL completions surfaced by the relocation: filament_vendor
["Prusa Polymers"] on the 8 @XL declarers; Prusament PA-CF typed
PA11-CF (the product is Prusament PA11CF) and PC-CF typed PC-CF
(-CF family typed as base polymer); each family converges on one id.
- Succession: 331 ids retired with mode-rule successors, 355 never-shipped
v1 mints forgotten with chain splicing, 151 GF-shaped ids released to
the island space with hints, 27 curated BBL-generic -> OFL-generic
hints (GFL99 -> OFDSrzZ8 class). New --retire "OLD=NEW" maintenance
mode records lineage for OGFC99/OGFG99/OGFN99 (the shipped ids of OFL's
Generic PC/PETG/PA in released versions, whose claims migrated in v3.1
while Cubicon's inert fork declarations kept them alive).
- Retiring the P-hex system ids removes the last system ids from
check_ams_filament_valid's destructive P-gate.
- AMS-ambiguity fixes surfaced by convergence (validator -f): 4 presets
riding another family's id through inherits now declare their true
family id (Elegoo Generic ASA-CF/PETG-CF, Snapmaker PolyLite Dual PLA /
PolyLite J1 PLA); 9 Cubicon @base presets and Dremel Generic PLA, which
duplicate their per-printer variants on the same printers, split onto
the salt-1 iteration of their triple (sanctioned by the mint-conformance
check; --remint now leaves salt-conformant declarations alone).
Gates: assign_filament_ids --check 0; orca_extra_profile_check 0;
116 python unit tests; config-equivalence over all 5892 instantiated
presets (byte-identical configs except the 14 sanctioned Prusament
vendor/type corrections; setting_id and compatible_printers unchanged;
per-family convergence and ledger conservation verified); profile
validator base/-f/-r(BBL)/-r(Qidi) all green; libslic3r_tests 48610
assertions; Moonraker OFL generic map check; custom-preset fixture
archives v1.9.0-v2.4.1.
Implements phase v3.0 of filament_id_plan_v3.md - tooling and client
prerequisites. No filament_id values change in this commit.
Tooling (scripts/assign_filament_ids.py; 106 unit tests):
- The mint key becomes "filament_product/<filament_vendor>/<filament_type>/
<family_name>", resolved loader-faithfully from the declarer's flattened
config - bundle-independent and content-addressed; identity fixes re-id
by design and are made safe by the succession ledger. --mint now takes
the triple.
- The snapshot gains "triples" and "triple_exceptions" sections, folded
into the equality gate: any vendor/type/name change surfaces as a
reviewable snapshot diff. Check 3 rewritten to triple-mint conformance
with (id, triple) grandfathering; check 5 generalized from OFL generics
to every OFL-riding vendor preset; new check 8 (triple integrity) and
check 9 (succession integrity).
- The retired ledger moves to resources/profiles/retired_filament_ids.json
so it ships with the app; schema {claims, successor} plus cross-island
"hints". The 14 v1 entries are migrated with mode-rule successors.
Vanished ids in a foreign island's space (GF*/QD_*) are RELEASED with a
hint instead of retired: the island catalog owns them and may
legitimately (re)ship them, which check 4 must never block.
- New maintenance modes: --remint VENDOR, --drop-redundant-ids VENDOR,
--add-hint "OLD=NEW", and --update-snapshot --forget-never-shipped FILE
(never-shipped ids drop from lineage; chains splice through them).
Runtime (C++):
- Succession helpers in libslic3r/Preset (pure chain-follow + lazy ledger
load from resources), consulted only on resolution miss in
get_filament_by_filament_id, both AMS sync predicates,
add_ams_filaments, setting_id_to_type, and the calibration-history
lookup; behavior is byte-identical while the ledger has no matching
entry. Catch2 coverage in tests/libslic3r.
- W1 hardening: check_ams_filament_valid no longer remote-wipes trays or
rewrites temps for P-shaped ids that a system preset carries (ten such
system ids ship today); the size==8 && [0]=='P' assert is relaxed; the
unguarded filament_list find deref in the temp-equation check returns
non-destructively on a miss.
- MoonrakerPrinterAgent: the 23 hardcoded OFL generic ids are replaced by
a runtime lookup of "Generic <family> @System" (id-equivalent on
today's shipped profiles, follows future re-mints automatically);
scripts/test_moonraker_lane_data.py derives its expectations from the
shipped profiles and gains --check-ofl-map.
Profile data (W3 - type is now a key component, so type bugs are fixed
before any re-mint):
- 17 same-name-different-type groups corrected across 50 files (OFL
Generic PETG-CF/PE-CF/PP-CF; Flashforge ASA Basic/ASA-CF/ABS-CF/HIPS/
PAHT-CF/PLA Silk; FusRock PAHT; Creality Generic PA6-CF; InfiMech PETG;
Anycubic TPU 95A / TPU for ACE; Prusa Generic PA-CF/PLA-CF) - every
value validated against MaterialType::all(); 3 Snapmaker U1 roots gain
their missing filament_vendor. Flattened-config equivalence vs the
previous commit: exactly the 54 intended diffs, zero BBL.
- doc/developer-reference/filament_id.md rewritten for the v3 rule.
Ambiguous type divergences (Prusa Generic TPU/TPU HF FLEX-vs-TPU, FusRock
S-Multi/S-PAHT) and all same-type vendor-tag divergences are deferred to
the v3.2 vendor worksheets, catalogued with analysis.
Phase 0 of the filament_id cleanup (filament_id_plan.md):
- scripts/assign_filament_ids.py: mint OF-prefixed 8-char ids as
uuid5(FILAMENT_ID_NAMESPACE, filament_family/<vendor>/<family>) in the
base62 derivation of the setting_id precedent; loader-faithful effective-id
resolver (vendor inherits chain + OrcaFilamentLibrary fallback); CLI:
default assign run (idempotent no-op on a fully-idded tree),
--mint Vendor/Family, --update-snapshot, --check.
- scripts/filament_id_snapshot.json: the sanctioned-state ledger (1092 ids,
1965 family claims over the current tree). The tree must equal it exactly,
both directions, so every id/claim change lands as a reviewable diff; a PR
snapshot diff is the maintainer gate. scripts/retired_filament_ids.json is
the append-only retirement ledger; --update-snapshot refuses to resurrect
retired ids and to sanction new reserved-namespace claims (GF*/QD_*/P-hex/
null) for non-owner vendors without --allow-shared-catalog.
- orca_extra_profile_check.py: runs check_filament_ids() tree-wide (format,
snapshot equality, mint conformance, retired reuse, alias hygiene for tuned
OFL generics, reserved namespaces, structure ratchet). The pre-existing
check_filament_id() 8-char rule stays BBL/OFL-scoped: grandfathered longer
ids exist elsewhere (e.g. Prusa's 36-char name ids) and are frozen via the
snapshot instead.
- PresetBundle::check_duplicate_filament_subtypes now includes
OrcaFilamentLibrary presets in every vendor's per-printer duplicate check;
alias-shadowed library presets are excluded via the existing
m_excluded_from population (verified live in the validator load path), so
only genuinely visible duplicates are flagged. AMS tray-id resolution logs
a warning when a filament_id matches 2+ compatible presets (pick unchanged).
- doc/developer-reference/filament_id.md: the authoring rule; PR template
gains a no-hand-written-ids checkbox.
- scripts/tests/test_filament_id.py: 46 stdlib-unittest tests (mint vectors,
resolver semantics, every check firing/silent, ledger round-trips, byte
preservation, real-tree smoke).
Verified: python -m unittest discover -s scripts/tests (46 OK);
python scripts/orca_extra_profile_check.py exit 0 on the unmigrated tree;
assign run is a no-op; rebuilt OrcaSlicer_profile_validator -l 2 exit 0;
extended -f is strictly additive vs baseline (every baseline group preserved,
all new groups involve library presets, alias exclusion proven by BBL-mirror
absence on BBL printers).