Go to file
Ali 1f32d0b07d One-stop ƏMAS-import diagnostics in Error Log
Goal: stop asking the user to run console snippets every time the
import looks broken. After finalize the wizard now writes two
self-contained Error Log rows that together answer "what did the
wizard ask for, and what actually happened":

1. "Jey Wizard trace: amas dispatch" — written immediately when
   _materialize_amas_employees calls import_bulk_employees. JSON
   payload covers: how many employees we passed, the result dict
   from import_bulk_employees, parallel_module_available + bulk_
   parallelism (was the worker code refactored?), full Asan Login
   state with import lock + session/csrf lengths, wizard cache
   shape (employee count, first-row keys, doc_oid presence,
   contract_status distribution), recent RQ Job rows for the
   bulk import worker.

2. "Jey Wizard trace: amas outcome" — enqueued to the long queue
   right after dispatch. Polls RQ for the bulk import job (up to
   ~90s) until finished/failed/stopped/cancelled, then writes:
   final RQ status + truncated exc_info, employee count in DB for
   the new company, AMAS Employees count, post-run Asan Login
   state (lock cleared? session still alive?), and the last 10 min
   of AMAS-tagged Error Log rows excluding our own traces.

Together that's enough to localise any of the failure modes I'd
otherwise investigate one-by-one (CSRF abort, expired session,
stale lock, parallelism module mismatch, all-employees-filtered).
The user only needs to grep `Jey Wizard trace: amas*` and paste
the two rows back.
2026-05-01 16:41:33 +00:00
jey_wizard One-stop ƏMAS-import diagnostics in Error Log 2026-05-01 16:41:33 +00:00
.editorconfig feat: Initialize App 2026-04-22 10:00:16 +00:00
.eslintrc feat: Initialize App 2026-04-22 10:00:16 +00:00
.gitignore feat: Initialize App 2026-04-22 10:00:16 +00:00
.pre-commit-config.yaml feat: Initialize App 2026-04-22 10:00:16 +00:00
CLAUDE.md Add FIFO/Moving Average picker; add CLAUDE.md 2026-04-24 13:01:18 +00:00
README.md feat: Initialize App 2026-04-22 10:00:16 +00:00
license.txt feat: Initialize App 2026-04-22 10:00:16 +00:00
pyproject.toml feat: Initialize App 2026-04-22 10:00:16 +00:00

README.md

Jey Wizard

Jey Wizard

Installation

You can install this app using the bench CLI:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch main
bench install-app jey_wizard

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/jey_wizard
pre-commit install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

unlicense