T8.2 - CR-010: the warehouse owner is an account, on the package

A named person owns fulfillment of the kit - today that is Paul Coonrod,
informally, and everything bottlenecks through him. The package now records
it explicitly:

- The Warehouse owner control is a dropdown of project members (the same
  roster the Owner picker reads). Picking someone stores BOTH the display
  name (kitOwner - exports and old renderers keep working) and the account id
  (kitOwnerId - the routing CR-011's notifications will read at T8.3).
- Confirmed Aug 18: the field lives ON the work package, not the project - a
  package retargeted to a different warehouse notifies the right person
  without touching the project. The wizard gets no field.
- A stored name with no matching account - typed before the field was
  account-backed, or someone since removed from the project - is KEPT as a
  selected "(no account)" option and round-trips unchanged. Removing someone
  from the project breaks nothing.
- The dashboard filters by warehouse owner, options drawn from the owners
  actually present in the data - a filter offering people with nothing to
  fulfill is noise.

Verification (each probe run alone): kitting_check.py extended to 21/21
(T8.2 section: picker, id+name persistence, orphan survival, board filter).
Regression: generalinfo_check 49/49.

Items: CR-010

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 12:00:14 -07:00
parent 79c4a36c70
commit 96387105f4
4 changed files with 99 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Are kitting statuses a set, and is kitting off for Micron EUV? — CR-009, T8.1.
"""Kitting: statuses, the owner, the filter — CR-009 (T8.1) + CR-010 (T8.2).
The statuses become an explicit five (Not Started / Picking / Staged /
In Transit / Delivered) - fulfillment states, not free text. A value stored
@@ -131,6 +131,61 @@ def main():
(page.eval("collectPackage().kitStatus"),
page.eval("collectPackage().kitOwner"))))
# ── 4. CR-010: the warehouse owner (T8.2) ────────────────────────────
print(chr(10) + "4. CR-010: the warehouse owner")
page.eval("set_sop_reload = 0") # marker only
page.goto(base + "/wp-creation-index.html?project=projA")
dismiss_dialogs(page)
wait_creator(page)
settle(1.6)
page.eval("window.alert=()=>{}; window.confirm=()=>false; window.prompt=()=>null;")
chk("the warehouse owner is a dropdown of project members, not free text",
page.eval("document.getElementById('wp_kit_owner_sel').tagName") == "SELECT"
and page.eval("document.getElementById('wp_kit_owner_sel').options.length") > 1,
page.eval("document.getElementById('wp_kit_owner_sel').options.length"))
page.eval("""(() => {
const sel=document.getElementById('wp_kit_owner_sel');
sel.value=[...sel.options].find(o=>o.value==='user_sue').value;
sel.onchange.call(sel);
})()""")
got = json.loads(page.eval(
"JSON.stringify({name: collectPackage().kitOwner, id: collectPackage().kitOwnerId})"))
chk("picking a member persists BOTH the display name and the account id "
"(the id is what CR-011 notifications will read)",
got["id"] == "user_sue" and got["name"], ascii_(got))
page.eval("""loadPackageIntoForm({subject:'legacy owner', type:'Conduit Install',
kitOwner:'Paul Coonrod', constraints:[], holds:[]})""")
settle(0.8)
chk("a stored name with NO account renders as a kept '(no account)' option "
"- removing someone from the project breaks nothing",
page.eval("document.getElementById('wp_kit_owner_sel').value") == "__orphan__"
and "no account" in page.eval(
"document.getElementById('wp_kit_owner_sel').selectedOptions[0].textContent"))
chk("...and the stored name still round-trips",
page.eval("collectPackage().kitOwner") == "Paul Coonrod")
# the dashboard filter
page.eval("""(() => {
const mk=(id,num,owner)=>({id, number:num, subject:'kit '+num,
type:'Conduit Install', status:'Draft', kitOwner:owner,
constraints:[], holds:[], projectId:activeProjectId});
savedPackages.push(mk('wpKA','WP70-KA','Paul Coonrod'));
savedPackages.push(mk('wpKB','WP71-KB','Sue'));
saveStore(); renderSavedList();
})()""")
page.eval("showDashboard()")
settle(1.2)
page.eval("dashFilter.kitOwner='Paul Coonrod'; dashPage=0; renderDashboard()")
settle(0.8)
board = page.eval("(document.getElementById('dash-body')||{textContent:''}).textContent")
chk("the dashboard filters by warehouse owner - their package shows",
"WP70-KA" in board, ascii_(board, 120))
chk("...and the other owner's does not", "WP71-KB" not in board)
chk("...through a labelled control on the board",
page.eval("!!document.querySelector('[aria-label=%s]')"
% json.dumps("Filter by warehouse owner")))
js_errors = [e for e in page.js_errors() if "beforeunload" not in e]
chk("no JavaScript errors anywhere in this run", not js_errors,
ascii_(js_errors[:2]))