Skip to content

v0.3.0

Choose a tag to compare

@s1dharthpv s1dharthpv released this 11 Sep 10:24
· 4 commits to main since this release

Bump version to 0.3.0

Since v0.2.0: 3 new features, a real security fix, a full round of
dashboard visual/UX/functional fixes, and a naming-convention fix.

Added:

  • Manual downtime logging on the shop-floor dashboard (PR #12) - the
    only prior path to a Downtime Log was the authenticated IoT webhook,
    so a machine with no network port had no data-entry path at all.
    Wires a "Log Downtime" button to the existing governed-action
    pipeline; still lands Pending, still needs approval.
  • Agent Rule -> maintenance trigger (PR #13) - a new request_maintenance
    Action raises a draft ERPNext Asset Repair against a workstation's
    linked Asset, so an Agent Rule (e.g. Availability < 50%) can now
    actually do something instead of only feeding scheduling/andon/
    downtime. Left as a draft, not auto-submitted. Live verification (not
    just unit tests) caught a real bug: agent-sourced requests arrived
    with an empty params dict, which would have failed every single
    automated call against a hard-required description field. Fixed with
    an auto-generated description on non-Human sources.
  • Job Card Traceability report (PR #14) - one chronological view across
    Downtime Log, Action Log, Schedule Slot, Scheduling Run, and
    same-window Workstation OEE Log for a given Job Card. No new data
    recorded, just the first place that answers "what happened to this
    job."

Fixed:

  • Security: Action Log, Scheduling Run, and Machine Event Log --
    this app's entire audit trail -- were forgeable via a direct Desk
    save
    (PR #16). read_only on a field is a UI hint only, not
    server-enforced; none of the three had a validate() at all, so
    doc.status = "Executed"; doc.save() on a Pending Action Log
    silently succeeded with no handler run, while the audit trail
    recorded it as if it had. This broke the app's central claim that
    every request/approval/rejection/execution is one audited row. Found
    by testing that exact claim directly, not by inspection. All three
    doctypes now reject any direct edit to their audit-critical fields;
    the legitimate engine paths (which only ever use db_set()) are
    unaffected.
  • Traceability report showed a false-positive OEE row for an unstarted
    Job Card (PR #15) - getdate(None) returns today's date, not None,
    so a Job Card with no date fields yet silently picked up whatever
    unrelated OEE happened to log today.
  • 13 visual/UX/functional fixes across the Scheduling Gantt and
    shop-floor dashboard (PR #17): cramped Andon action buttons, an
    unlabeled/misaligned Gantt header and grid, the Approve button
    silently buried in a menu instead of being the primary action,
    inconsistent table header heights causing page-wide horizontal
    scroll, missing column/block separators, truncated block labels, a
    real drag bug that made blocks vanish on the first pixel of movement
    (a computed-pixel-vs-inline-percent unit mismatch), no horizontal
    scroll for wide date ranges, no loading state, no "now" marker, no
    color thresholds on OEE numbers, and no way to open a block's
    underlying record.
  • Naming series consistency (PR #18) - Action Log, Andon Alert,
    Downtime Log, Machine Event Log, Schedule Slot, Scheduling Run, and
    Workstation OEE Log all used autoname: hash, producing names like
    "00qrbpha08" instead of the readable, sequential IDs (e.g.
    "DT-LOG-2026-00001") that ERPNext's own equivalent doctypes
    (Downtime Entry, Asset Maintenance Log, Stock Ledger Entry) use.
    Forward-only: existing hash-named records are untouched.

Internal (PR #10, #11): deduplicated ~140 lines of repeated test
fixture setup across 7 test files, added a missing company field on
Changeover Rule, added track_changes to two doctypes that were
missing it, converted raw SQL to frappe.qb in the OEE engine, fixed a
stale test count in the README.

14 new tests since v0.2.0 (71 total, up from 57), full suite green
throughout, verified on the real v15/v16 CI matrix.

One flaky test found and fixed during this release's own CI, not
shipped unresolved: test_collects_every_event_type_chronologically
intermittently lost its OEE row because it only forced one end of a
two-ended date window (expected_start_date), leaving expected_end_date
at a leftover fixture-creation-time value that sometimes landed before
it -- inverting the report's BETWEEN filter. Root-caused with a live
CI debug capture, not guessed; the report and scheduling engine were
both innocent. Fixed by having the test set both ends explicitly.