Repository navigation
Conversation
… before paying
A customer's boards went out with leaded HASL. KiCad's job files said
"Finish": "None", but Buy it's manifest sent options.finish = "hasl".
The skill told agents that omitted options take the first catalog value,
which is the leaded one, and the DRC profile also defaulted to "hasl".
The customer also never saw the board specs at checkout and had no place
to write manufacturing notes.
- fab/finish.rs: a board's finish is the one chosen in its options, else
KiCad's, else hasl_lead_free. KiCad's finish comes from the gerber job
file exported with the gerbers (GeneralSpecs.Finish) or from the board
stackup's copper_finish. HAL SnPb maps to hasl, HAL lead-free to
hasl_lead_free, ENIG/ENEPIG to enig and OSP to osp; None or unknown
falls back to the default. A plain "hasl" written by an agent counts as
lead-free unless KiCad says HAL SnPb, matching the ordering side.
order_quote writes the finish into the manifest before the person is
asked to send, and the estimate and the DRC profile (Opts default)
follow the same rule. The fab-spec and backplane-buy skills now tell
agents to leave the finish out.
- The Order card lists every board's specs once the quote is in: copper
layers, thickness, mask, surface finish in words ("Lead-free HASL",
"HASL with lead", "ENIG"), copper weight, quantity, assembled count and
sides. They are kept at Send as order.specs.<thread>. GPUI, Android and
iOS all show them.
- GPUI: an optional "Notes for manufacturing" box (max 2000 characters)
sits above Buy now. With notes, the new hub RPC order.notes posts them
to the order server (POST /v1/quotes/<id>/notes with the quote's token)
and answers the pay link only once the server takes them. A refusal
(already paid, too long, server away) shows on the card and checkout
stays closed. The quote message's Buy now link goes through the same
step. The phone apps have no notes box yet.
Tested: cargo test --release --bin backplane-hub with fab::,
settings::order, settings::fab, agents::tests::order, present::thread,
state::policy and import014 (150 passed). The new tests cover the
customer's case (job file "None" gives lead-free), KiCad SnPb, a chosen
finish, an agent's plain hasl, the specs words, and notes against a
stand-in order server (sent with the token before the link, nothing sent
when empty or too long, 409 gives no link). gpui: cargo test
screens::order, keys, i18n (all pass). scripts/i18n-check.py and
i18n-android.py --check pass. The Android unit test did not run: main's
DataSections.kt has unrelated compile errors (projectKey), and the
compiler reported none in the changed files. iOS was not built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A customer's boards went out with leaded HASL. KiCad's job files said
"Finish": "None", but Buy it's manifest sentoptions.finish = "hasl". The bundled fab-spec skill told agents that omitted options take the first catalog value, which is the leaded one, and the DRC profile also defaulted tohasl. The customer also never saw the board specs before paying, and had no place to write manufacturing notes.What
Finish: lead-free by default, KiCad's when it says one (
native/host/src/fab/finish.rs)hasl_lead_free.GeneralSpecs.Finish), or from the board stackup's(copper_finish ...).HAL SnPb→hasl,HAL lead-free→hasl_lead_free,ENIG/ENEPIG→enig,OSP→osp.Noneor anything unknown falls back to the default.haslwritten by an agent counts as lead-free unless KiCad saysHAL SnPb, which matches the ordering side. The explicit ways to get leaded are the KiCad stackup or the manufacturing notes.order_quotewrites every board's finish intomanifest.jsonbefore the person is asked to send, so they approve, and the server gets, what will be made.Opts::default) follow the same rule.fab-specandbackplane-buyskills now tell agents to leave the finish out.Specs before paying
order.specs.<thread>setting.Notes for manufacturing (GPUI)
order.notes {thread, notes}. It sendsPOST /v1/quotes/<id>/noteswith the quote's bearer token and returns the pay link only after the server accepts the notes.New UI strings are in
i18n/{en,ja,es}.msg, and the Android and iOS catalogs are regenerated.Testing
cargo test --release --bin backplane-hubwithfab::,settings::order,settings::fab,agents::tests::order,present::thread,state::policy,import014: 150 passed."None"giveshasl_lead_freeHAL SnPbgiveshaslhaslbecomes lead-freeorder.notesagainst a stand-in order server: the notes are sent with the quote's token before the link is returned; nothing is sent when the notes are empty or too long; a 409 returns no link.cargo test --releasefiltered toscreens::order,i18n,keys: 93 passed.scripts/i18n-check.pyandscripts/i18n-android.py --checkpass.scripts/check-android-i18n.pyreports 4 problems, all inDataSections.kt, which this PR doesn't touch.OrderCardTest) did not run. Main'sDataSections.ktcurrently fails to compile (projectKeyis unresolved); the compiler reported no errors in the files this PR changes.Follow-ups
haslfrom a client with this change means KiCad explicitly said leaded. The ordering playbook currently makes leaded only from operator instructions, so it may want to honour that value.🤖 Generated with Claude Code