For the HHA Brain Developer · From the HHA Brain CTO
For the HHA Brain Developer — From the HHA Brain CTO — October 8, 2026, 12:33 AM ET — Brain tasks ready now
Name and address. The HeavyHaul Factory is now the Brain, moving to brain.heavyhaulagent.com. The Workspace moves to heavyhaulagent.com. Repository: /Users/nashturcan/Desktop/HEAVYHAUL-AGENT, branch main, commit 29514d3.
The status on every task says who it's waiting on:
- Waiting on Developer means it's ready. Nothing from any CTO or from Nash holds it back.
- Waiting on Synchron CTO or Waiting on Workspace CTO means another team must deliver something first.
- Waiting on Nash is used only for a business or operations decision.
- The history backfill is yours, and it reuses the Brain's existing readings (B10) instead of reading old permits again.
- The Workspace will use B10 for every pushed Synchron permit, so pushed permits are never read twice.
- Synchron pushes an order when a permit is attached, and always calls the Brain's
update-orderfirst. The Brain's reading is normally ready when the Workspace asks, and "not ready" should be rare. - You pull the two failing permit files yourself, from the Workspace's storage, once you have read access to that location.
- B12, the new Express count, needs two sign-offs before it's switched on: the Synchron CTO's and Nash's, both after the effect report.
- The old Brain home page and early-access sign-up are retired at the address switch, right after the Workspace home page is confirmed working on
heavyhaulagent.com.
- N8: the Express count becomes "real loads only", one per real order, with practice orders and repeat readings left out. Release stays at the 4th counted use. That is the new task B12, and it also changes how B4 and B5 count. Synchron is shown the effect before rollout.
- N9: the same permit on a different trip is allowed, with no warning. Only same-trip duplicates are rejected (B8).
- A3: the personal Gmail BCC on Dimension Alerts stays. Nash explicitly authorized it. A3 is no longer a code task, and only a private check of that mailbox's security remains (see "Your other actions").
- D-1: on Synchron's own orders with no driver, the Express email goes to the client instead of failing (added to B6).
- D-2: a separate staging Brain is approved. You design it, size it and price it (see "Your other actions").
- D-3, N5, N6, N7: the history backfill reuses B10. The two permit files come from the developer who holds them. The Brain team notifies the other TMS clients 30 days before the switch. The old home page and early-access sign-up are retired only after the Workspace's home page works and the sign-ups are preserved.
- Still in force: you are the assigned Brain developer, A1 and A2 are critical and go first, you hold production access, and the domains are confirmed.
Everything in sections A, B and C is ready now, and each task is waiting only on you. Each card gives the purpose, how to do it, when it's done, a confidence score, the risk of conflict with existing code, and the effort. Where part of a task depends on someone else later, the card says which part, and the ready part can still be built now. Tasks that can't start yet are listed at the end, with what holds each one back.
How sure the Brain CTO is that the task is relevant and needed for the integration now, not how hard it is. 95% or above means it's certainly needed and every detail is settled. 75–90% means it's needed, with one detail settled later by someone else. Below 75% means it's useful but could wait.
Status board
Developer progress update — October 14, 2026. The original “Status” entries below name the party responsible; they are not completion claims. The new “Developer progress” column records what the reviewed local repositories and this project's deployment reports support. “Not confirmed” means completion has not been evidenced here, not that no code exists. Production behavior has not been independently audited for this update.
| # | Task | Days | Confidence | Original owner | Developer progress · Oct 14 |
|---|---|---|---|---|---|
| C0 | Branch and test baseline | 0.1 | 100% | Waiting on Developer | Partial Branch and baseline recorded; unlisted-commit review remains open. |
| A1 | Stop the chat bot showing another customer's order | 0.25 | 99% | Waiting on Developer · critical | Code done Fix committed (14bb507); live access audit not confirmed. |
| A2 | Take the Google AI key out of the code, and replace it | 0.25 | 99% | Waiting on Developer · critical | Partial Code committed (35a69b9); manual key change reported, old-key rejection and all-host audit not confirmed. |
| A3 | 0 | — | No code change | Closed by decision | |
| B1 | Real route text in all 47 states, as texts[] | 0.5–1 | 98% | Waiting on Developer | Reported live Code committed (3dd08d9); deployment confirmed by developer. |
| B2 | Handle HHA orders (9 digits / source = hha) | 0.75 | 92% | Waiting on Developer | Code merged Gate 2 code and migrations merged; live end-to-end proof outstanding. |
| B3 | Error codes and no_route_text | 0.5 | 95% | Waiting on Developer | Code merged Error handling and tests present; live 422/503 acceptance not confirmed. |
| B4 | Use counts for the Workspace | 1 | 92% | Correction ready for review | Original endpoint live; safety correction unmerged Oct 15: the original Brain endpoint POST /api/workspace/route-token-usage is deployed. The follow-up branch scopes numeric route counts by state and token, excludes carriers 43/49, Synchron's imported practice-token list, and is_training orders; counts each HHA order once; and logs database errors instead of returning a false zero. Pre-change Workspace-only usage without a state now returns unknown history rather than zero. Legacy token-only requests return empty usage under the unchanged prior-real-orders-v1 rule. Oct 16: Nash's CSV was checksum-verified (2,542 unique tokens; carrier 43: 1,744; carrier 49: 798) and imported under a unique index in production. The branch has a checksum-gated importer and a batched, read-only strict-history report; the private CSV is not tracked. Focused Brain tests: 22 passed. The report result remains pending. It is not merged or deployed. |
| B5 | Express signal lookup for Synchron | 0.5 | 90% | Waiting on Developer | Not complete Lookup endpoint absent. |
| B6 | Express email: HHA recipients, and the client when there's no driver | 1 | 85% | Waiting on Developer | Not confirmed |
| B7 | Voice widget works at any address | 0.25 | 95% | Waiting on Developer | Code prepared; live voice failure reported Oct 15: voice widgets use the script origin with the Brain subdomain fallback; chat icon is local. 10 origin checks and 61 dashboard/widget tests pass. Oct 21: Workspace connects to LiveKit but times out waiting for the worker to confirm the selected permit. The downloaded worker log ends Oct 21 at 06:56:34 UTC, before the reported browser failure; all 19 worker registrations are anonymous, with no Workspace room recorded. Later Oct 21 application logs confirm four Workspace Mongo voice sessions were prepared and text chat responded successfully; token dispatch and dedicated Workspace worker acceptance remain unverified. Connection-code comparison confirms automatic test-bot dispatch versus named Workspace dispatch. Four isolated dispatch-contract checks passed; no environment file was changed. The operator's dedicated-worker launch then failed before registration because port 8083 was occupied. Recovery command corrected to avoid the occupied port. Oct 21 operator logs at 07:42:28 UTC confirm the named Workspace worker registered on port 8084, accepted a Workspace room, loaded the trip, and reached speaking at 07:42:31 UTC. Browser audio, selected-permit acceptance, spoken question/answer, and managed restart persistence remain unverified; no .env edit was reported. Existing Brain fixes 89e367a/d9b4ef7 provide permit confirmation and named dispatch. Nine Workspace confirmation/token/selection tests pass. Recovery steps are documented; deployment and live acceptance remain pending. |
| B8 | File fingerprint in each reading | 0.25 | 85% | Waiting on Developer | Not confirmed |
| B9 | Log which credential each Workspace call uses | 0.25 | 90% | Review pending | Implemented; not deployed Oct 19: telemetry branch records Host, safe caller method/client or credential label, path, status and duration for inbound requests; retention is at least 30 days. Focused tests pass locally (57). Review, merge, deployment and live-log verification remain pending. |
| B10 | Hand the Workspace the existing reading of Synchron permits | 1 | 95% | Waiting on Developer | Not confirmed |
| B11 | Route files for the Workspace (F12) | 2.5 | 90% | Waiting on Developer | Not confirmed |
| B12 | Express count: real loads only (N8) | 1.25 | 95% | Waiting on Developer · rollout: Synchron CTO + Nash sign-off | Not complete Still uses Frequency > 3; no effect report or switch-on approval. |
| C1 | Signature check, switched off / log only | 1 | 80% | Waiting on Developer | Not confirmed |
| C2 | Accept a current and a next token | 0.5 | 85% | Waiting on Developer | Not confirmed |
| C3 | Stable Idempotency-Key on Brain calls | 0.5 | 80% | Waiting on Developer | Not confirmed |
| C4 | Timeouts on reads from Synchron | 0.25 | 90% | Waiting on Developer | Code merged Bounded reads and tests present; live timeout evidence pending. |
| C5 | Stop the order queue dropping orders | 0.25 | 85% | Waiting on Developer | Code merged Lock/retry tests present; live queue evidence pending. |
| C6 | Read every route part, warn above 20 | 0.25 | 70% | Waiting on Developer | Not confirmed |
| C7 | History of replaced route links | 0.75 | 70% | Waiting on Developer | Not confirmed |
| C8 | Settings instead of written-in addresses and keys | 0.5 | 85% | Waiting on Developer | Not confirmed Oct 15: public callback/verification URL settings and subdomain login/CORS examples documented. Full address, recipient and key-fallback requirements remain unconfirmed. |
| C9 | Test: the trip AI never shows route links | 0.25 | 80% | Waiting on Developer | Not confirmed |
| C10 | Write down the Brain's side of the contract | 0.5 | 85% | Waiting on Developer | Not confirmed Oct 14: client vehicle guide recorded; Brain endpoint/auth applicability and production availability unconfirmed. |
| C11 | Background jobs, part A (F8 A) | 6–8 | 80% | Waiting on Developer | Not confirmed |
Original October 8 estimate: all 26 coding tasks, about 21.5–23.5 working days, or about 15.5 days without C11. This is historical planning text, not the October 14 completion count. Suggested order then: C0, then A1 and A2, then B1, B12 and B2–B11, then C1–C10, then C11.
Developer gate tracker — October 14, 2026
This is a working implementation update, not a change to the CTO's original requirements. It is based on local Brain main at 57b14d9, Workspace main at 10dfc3f, their tests and deployment statements in this project. A reported deployment is not independent production verification.
| Gate | Current status | Evidence and remaining exit condition |
|---|---|---|
| 1 · Security | Code done; proof pending | A1 fix and A2 environment-key code are committed. The developer reported changing the key manually. Confirm the deployed commits, audit every server/worker/CI location, and prove the old key no longer works. |
| 2 · Stabilize | Merged; acceptance pending | B1 is reported live. B2, B3, C4 and C5 are merged; Workspace migrations 0057/0058 and deployment were reported applied. Oct 14 focused local regression: Brain 90 passed and Workspace 20 passed, with no failures (developer-provided terminal output). Still verify live callback/retry behavior, the 11 failure timestamps, Express email worker, callers of /api/update-state and /api/update-user, and an access-controlled test database copy. Do not treat the gate as independently signed off. |
| 3 · Counts, built but off | B4 correction awaiting review | The original B4 endpoint is deployed. Its state-and-token, real-order safety correction is on an unmerged branch with focused Brain and Workspace tests passing. B12 distinct-real-order rollout behind EXPRESS_COUNT_RULE, the per-route effect report, and B5 Express lookup endpoint remain to be completed and approved in writing by Nash and Synchron CTO. |
| 4 · Paid-route delivery in staging | No verified completion | Separate staging Brain, B8, B10 and history backfill, B6, B11 GPX/Hammer delivery, and a joint end-to-end test are still to be evidenced. The two failing permit files need safe test access. |
| 5 · Harden and move | No verified completion | C1–C3, B9, B7/C8, C6/C7/C9/C10, C11, client notices, sign-up export and the address move remain to be evidenced; later signature/key changes depend on Synchron. Oct 14: incoming Synchron vehicle contract recorded for C10; adoption and live verification remain pending. Oct 15: Brain subdomain code and deployment settings prepared for https://brain.heavyhaulagent.com; B7 is locally verified. DNS, HTTPS/server mapping, production environment, client URL changes, Workspace homepage readiness and live cutover remain unverified. Oct 21: selected-permit Workspace voice fails to receive worker confirmation; operator logs now confirm dedicated named-worker activation, Workspace job acceptance and speaking state on port 8084. Browser playback, selected-permit acceptance, a successful spoken exchange, and managed restart persistence remain unverified. |
Gate 2 step-1 check — October 14, 2026: the public Brain and Workspace health pages each returned HTTP 200. The administrators reported Brain server checkout 57b14d9 (after Gate 2 merge dd04787) and Workspace server checkout bce79a5 (after Gate 2 merge d3d63f4); Workspace PM2 reported its app online. The Workspace Supabase SQL Editor returned true for migration 0057's unique index, the 0058 permit-failure function signature, and service-role execute privilege. These are schema-effect checks, not a migration-ledger audit or verification of the running process/build and its restart time. No production gate sign-off is claimed from these checks.
The later CTO answers supersede this document's earlier B4 wording: Workspace shows prior real orders with route_usage_rule: "prior-real-orders-v1". If history is unknown, omit route_usage_count and use route_usage_rule: "unknown_history"—never show a false zero. Synchron's own B12 decision still includes the current order for its fourth-use release threshold; B5 checks whether three prior real orders already exist.
Client vehicle guide received — October 14, 2026. The guide covers all trailers/axles, order-level kingpin distance, verification flags and staff-login authentication for GET /api/v1/orders/{order_token}. See Brain handoff and unchanged client guide in the Brain repository.
Code: Synchron dev implementation reported by client; this task records documentation only. Tests: client reports dev testing, no test output supplied; local consumer review only. Migration: none supplied or applied here. Deployment: next Synchron production deploy pending, date unconfirmed. Live verification: none performed; Brain uses a different service endpoint, whose contract/authentication must be confirmed. C10 and Gate 5 completion status remain unchanged.
Brain subdomain preparation — October 15, 2026. Target: https://brain.heavyhaulagent.com. The Workspace keeps the root domain. B7 code is prepared; Gate 5 production completion is not claimed. See docs/brain-subdomain-move-2026-10-15.md in the Brain repository for configuration and rollback steps.
Code: static/heavyhaul-widget.js and static/voice_script.js derive their API origin from the executing script, with the Brain subdomain fallback; static/chat-icon.svg replaces the external chat icon. app.py adds the Brain CORS origin; email verification defaults, URL examples, docs, and .env.example callback/verification/reCAPTCHA settings target the subdomain. Existing Workspace/client CORS origins are retained. Tests: 61 passed in the dashboard/widget suites using an isolated temporary environment and a dummy local Mongo URI; four JavaScript syntax checks, 10 script-origin cases, isolated CORS response and verification-link checks, and SVG XML validation passed. Migration: no database migration required or applied. Deployment: local working-tree changes only; no DNS, cPanel, HTTPS, production environment, worker or client changes performed. Live verification: browsing could not access the new health URL or root homepage; availability and Workspace readiness are not established. The address switch, sign-up export, client coordination and old-page retirement remain pending.
Workspace voice incident — October 21, 2026. The supplied browser screenshot shows a LiveKit connection followed by a selected-permit confirmation timeout. Code: existing Brain commits 89e367a and d9b4ef7 implement permit acknowledgement and named dispatch; inspected in local origin/main history at 20f5f39, not proof of the running server version. No application change made. Tests: 9 Workspace confirmation, voice-token and permit-selection tests passed. Migration: none required or applied. Deployment: recovery instructions prepared for the CloudPanel application path; no server command executed from this chat. Live verification: user-supplied failure evidence only; logs show automatic Synchron workers, with dedicated Workspace activation unverified. B7 and Gate 5 remain incomplete. See recovery and acceptance steps.
Detailed gate plan and release checks
The client supplied this order after the October 8 task document. Work inside a gate may overlap, but a later production switch must wait for the earlier gate's evidence and required approvals. Statuses below are the developer update as of October 14; they do not replace the original task definitions.
Record the exact production commit, database migration level, and rollback point for each service before changing another release setting. C0 already has a branch and test baseline, but the review of the four “unlisted” commits is not fully closed. Keep an access-controlled test database copy for the tests that would otherwise change live route history.
Gate 1 · Security Code done; proof pending
- 1. A2 — rotate the old Gemini key. Replace it in Google Cloud, the Brain web server, background workers and any CI secrets. The environment-key code is committed and the developer reported changing the key manually; still verify every location and show that the old credential is rejected. Never record key values in this document.
- 2. A1 and A2 — confirm production deployment. Record the deployed commit and UTC time. An unknown eight-digit order must return “not found” without exposing another customer's order; the running processes must use only the replacement key. Code is committed, but this production proof has not been independently recorded here.
Exit: deployed version recorded, unknown-order access test passes, and old-key rejection plus server/worker/CI review are evidenced.
Gate 2 · Stabilize what landed Merged; acceptance pending
- 3. B1 route-text decision. Nash confirmed B1 should stay and reported it live. Record its production deploy time in UTC for Synchron, which needs to rebuild route-text rows written before that time.
- 4. B2 HHA-order fixes. A callback arriving before trip sync must be stored durably rather than answered with an unrecoverable 503; a permit stuck in processing must recover; one trip must map to one order; and a Workspace reading must be reused by file fingerprint. The code and migrations are merged. Prove these cases with repeated callbacks, one normal Synchron order, and no duplicate trip/order.
- 5. C0 development baseline. Continue on branches with a recorded test baseline and a short explanation of the four unlisted commits. Branch/test evidence exists; the exact four-commit review remains open.
- 6. Production investigation. Check Brain request logs at the eleven UTC failure times listed in the CTO task document; confirm the Express email processor is enabled and running; identify real callers of
/api/update-stateand/api/update-user; and create an access-controlled test copy of the database. These are operational checks, not inferred from local code. - 7. C5 order queue. Keep the OS lock, retry with backoff, never delete the lock file, and alert if it stays held over five minutes. Code and concurrent-insert tests are merged; verify a live or staging queue under contention.
- 8. C4 Synchron reads. Use bounded timeouts on order, user, carrier, truck and trailer reads. Code and timeout tests are merged; verify failure behavior with a slow upstream.
- 9. B3 error contract. Return a request ID and stable codes: terminal 422 (
not_a_permit,unreadable_file,no_state_detected), retryable 503 (reader_unavailable), and 500 (internal_error). Keepno_route_textdistinct from extraction failure. Code is merged; confirm live Workspace stop/retry behavior.
Exit: the production checks and test copy are documented, Gate 2 cases pass end to end, and no customer notification is triggered by a test.
Gate 3 · Counts, built but switched off Not complete
- 10. B12 real-order count and effect report. Count distinct real order tokens per state/route, including an HHA purchase once its permit reaches the Brain through
update-order. Exclude practice carriers 43/49, futureis_trainingorders, repeated readings and mirrored Workspace copies. Keep historicalFrequencyunchanged. Build behindEXPRESS_COUNT_RULE=frequency|real_orders, defaultfrequency; test three real orders (0) and four including the current Synchron order (1). Report every route whose answer changes and every high-frequency route with short or unknown token history; decide whether a one-time history rebuild is needed before rollout. This work and report are not yet present. - 11. B4 Workspace usage count. Add the Brain
POST /api/workspace/route-token-usageendpoint and reading fields, using the B12 function. Numeric tokens show prior real orders;workspace:tokens count distinct Workspace permits. Sendroute_usage_rule: "prior-real-orders-v1". For unknown old history, omit the count and sendunknown_history, never a misleading zero. Workspace already has a caller; the Brain endpoint is absent.
Oct 15 update: Brain endpoint and service implemented inroutes/workspace_updates.pyandservices/workspace_route_tokens.pyhonoringprior-real-orders-v1(numeric tokens count distinct prior orders;workspace:tokens count distinct permits; unknown history omitted). Verified with 6 unit tests intests/unit/test_workspace_route_token_usage.py. Deployed on cPanel (commits5ae83c8,74bd1be) and verified live via authenticated endpoint response. - 12. B5 Express lookup for Synchron. Add authenticated, uncached
GET /api/synchron/route-tokens/{state}/{route_token}/auto-approval. It answers 1 when at least three prior real orders exist, making the purchase the fourth counted use; accept text or numeric tokens. Test that it agrees with the B12 decision and meets the agreed lookup-time target. The endpoint is absent. - 13. B12 switch-on approval. Keep
frequencyactive after code deployment. Show the effect report to Nash and the Synchron CTO, obtain both written sign-offs, then enablereal_orderswith a rollback plan. No approval or activation is recorded here.
Exit: shared count tests, route-by-route effect report, no unknown-as-zero result, and both written approvals. Until then, the new release rule remains off.
Gate 4 · Paid-route delivery in staging No verified completion
- 14. Separate staging Brain. Propose the server size, hostname, one-time/monthly cost, test plan and isolation safeguards; then set it up with separate keys and no real customer data, email or callbacks. This unblocks safe joint tests.
- 15. B8 file fingerprint. Store the fingerprint with each reading so the same permit file is reused safely and a changed file is distinguishable. Test same-file reuse and changed-file behavior.
- 16. B10 existing readings and history backfill. Give the Workspace its already-read Synchron permit data only for a synced, authorized trip and matching state item. Return ready/processing/not-linked states as agreed. Backfill old real orders by reusing Brain readings and route tokens, re-reading only exceptions; exclude test carriers 43/49. Produce counts, exceptions and rollback evidence before completion.
- 17. B6 Express recipients. For HHA orders, send to the driver when present; otherwise to the purchaser/client, with the agreed CC recipients. Apply the separately switchable no-driver client fallback to Synchron orders. Test in staging without delivering to real people.
- 18. B11 GPX and Hammer files. Build the Workspace receiver and Brain delivery from Synchron's approved/released links, not untrusted Workspace links. Synchron must provide
delivered_atandroute_version; reject a mismatch asnot_released. Test signed, versioned delivery and repeats in staging. - 19. Joint end-to-end test. Run paid-route purchase, release, reading reuse and file delivery across Synchron, Brain and Workspace in staging, including retries and no accidental customer email.
- 20. Two failing permit files. Obtain Workspace read access, reproduce both failures in the test environment, and record whether the reader or source file needs correction.
Exit: staging evidence for authorization, reuse, payment-release boundary, files, retries and email isolation, reviewed with the Workspace and Synchron teams.
Gate 5 · Harden and move No verified completion
- 21. C1–C3 request hardening. Add signature checks in log-only mode first, accept current and next tokens during rotation, and use stable idempotency keys. Do not enforce signatures until Synchron is ready.
- 22. B9 credential observability. Record which scoped credential each Workspace call uses, without logging the credential itself; use evidence to retire the shared token safely.
- 23. B7 and C8 address preparation. Make the voice widget work at the new address and move secret/configured addresses to environment settings, with no embedded secret defaults.
- 24. C6, C7, C9 and C10 remaining contract work. Read every route part and warn above 20; retain replaced route-link history; test that trip AI never exposes restricted route links; publish the Brain-side API/event contract and samples.
- 25. C11 background jobs, part A. Replace fragile file/inline work with durable jobs, retries and operational monitoring; size and stage the 6–8-day change before production.
- 26. Customer-transition preparation. Confirm the TMS client list, give the required 30-day notice, and export early-access sign-ups before retiring the old home page.
- 27. Address move. Move Brain to
brain.heavyhaulagent.comonly after the Workspace home page works atheavyhaulagent.com; preserve rollback and then retire the old Brain home page. - 28. Later Synchron-dependent cutover. After joint readiness, turn signature enforcement on, rotate the shared token, issue four scoped keys, use Synchron tokens rather than internal IDs, and adopt the two-step reading calls. These steps require Synchron's coordinated delivery.
Exit: signed contract, observed credential migration, tested durable jobs, customer notices, verified new addresses and a coordinated rollback plan.
A. Safety first
A1Stop the chat bot from showing another customer's order Critical: owner B041
- Status
- Waiting on Developer
- Purpose
- When it can't find an 8-digit order number, the chat bot answers with order
26018709, or whichever order comes back first (logistics_bot/db.py:126-133). Any customer can see another customer's order. - How
- Delete the fallback block so an unknown order returns "not found". Add a test with an unknown order number.
- Done when
- An unknown order returns "Order not found", and no other order's data appears.
- Confidence
- 99% It's a live data exposure. The Workspace's trip AI uses the same engine.
- Conflict
- Low.
26018709appears nowhere else in the code. Demos that relied on "any 8-digit number works" will show "not found", which is the correct behavior. - Effort
- 0.25 day
A2Take the Google AI key out of the code, and replace it Critical: owner B041
- Status
- Waiting on Developer, for both the code change and replacing the key in Google's console (owner B041: rotate, not only remove).
- Purpose
- A backup Gemini key is written into
utils/pdf_dimension_extractor.py:334. Anyone with the code can use it. - How
- Read it from a new setting,
GEMINI_BACKUP_API_KEY, and add it to.env.example. When it isn't set, skip the backup retry and log that it was skipped. - Done when
- There's no key in the code, the old key has been replaced in Google's console and no longer works, and the new key is only in settings.
- Confidence
- 99%
- Conflict
- Low. Until the setting is filled in, a "rate limit reached" error from Google isn't retried with the backup key.
- Effort
- 0.25 day
A3The personal Gmail BCC on Dimension Alerts: closed, no code change
- Status
- Closed by Nash's decision A3. He explicitly authorized keeping the BCC.
- What it means for you
- Don't remove or replace the address (
utils/email_utils.py:20). If C8 moves it into a setting, the setting's default must be exactly today's address, so the routing doesn't change. Only the private mailbox-security check remains (see "Your other actions").
B. Integration: agreed with both CTOs, ready now
B1Send the real route text to Synchron in all 47 states (F1)
- Status
- Waiting on Developer. Synchron confirmed
texts[]is safe in production now. - Purpose
- 22 state processors send the words "Routing_From, Routing_To, Via" instead of the route, for example
utils/texas_route_processor.py:181. Every state also loses all but the last line, because the list arrives as a repeated field and only the last value is kept. Synchron repairs its records using this fix's deploy time. - How
- In those 22 files, send
[routing_from, routing_to, via], as the other 25 already do. Inutils/api_utils.py:186-200, send the list astexts[]. Add one test per state. Record the production deploy time (UTC) for Synchron. - Done when
- A
permittokencall for Texas, California and New York carries all three real lines, and the deploy time is recorded. - Confidence
- 98%
- Conflict
- Low. Synchron's stored route text becomes three lines on its own orders, which is what Synchron asked for. Route matching is unaffected.
- Effort
- 0.5–1 day
B2Handle HHA orders: 9 digits or source = hha
- Status
- Waiting on Developer. The
sourcefield arrives with Synchron's release, and the 9-digit fallback works until then. - Purpose
- Nash's rule: Synchron orders keep 8 digits, and trips created in HHA get 9. For HHA orders the agreed rules are no
permittoken, no permit-fee report, no Dimension Alert, and a trip copy that accepts 9 digits. - How
- One shared check, "is this an HHA order" (
source == "hha", or a 9-digit number). Apply it at those four places. Widen the pattern inservices/workspace_trip_sync.py:13to 8 or 9 digits. The permit is still read and counted once. - Done when
- Tests show a 9-digit order is read and counted but sends none of the three. 8-digit orders behave exactly as before.
- Confidence
- 92%
- Conflict
- None in production today. No 9-digit order exists. Synchron confirmed none of its 12,337 orders has 9 digits.
- Effort
- 0.75 day
B3Clear error codes and the "no route text" status
- Status
- Waiting on Developer. The Workspace handles a 422 as soon as it's deployed.
- Purpose
- An unreadable file gets a generic 500 with raw error text (
routes/workspace_updates.py:646, 683), so the Workspace retries it forever. A permit with no route text is reported as "failed". - How
- Return 422
not_a_permit,unreadable_fileorno_state_detected; 503reader_unavailable; or 500internal_error. Each carries arequest_id, never raw text. Split the route status intono_route_textandfailed(controllers/permit_controller.py:628). - Done when
- Each case returns its code in tests.
- Confidence
- 95%
- Conflict
- Low. Until the Workspace ships its side, a 422 is still retried, which is today's behavior.
- Effort
- 0.5 day
B4Use counts for the Workspace (F2)
- Status
- Waiting on Developer
- Purpose
- The Workspace already calls
/api/workspace/route-token-usage(src/lib/adapters/flask.ts:350), but the endpoint doesn't exist. The count is shown to customers for information only. - How
-
- For numeric tokens: use B12's distinct-real-order history, but show prior real orders, excluding the permit currently being read. This follows the later CTO answer and supersedes the original wording.
- For
workspace:tokens: count distinct Workspace permits. - Add
route_usage_countandroute_usage_ruleto each reading, and add the endpoint in the shape the Workspace already sends. Useprior-real-orders-v1; when old history is unknown, omit the count and useunknown_history.
- Done when
- The Workspace's existing call returns counts. A missing field means "not known", never 0.
- Confidence
- 92%
- Conflict
- None. It's a new endpoint and field, and it only reads.
- Effort
- 1 day
B5The Express signal lookup for Synchron
- Status
- Waiting on Developer. Synchron has agreed to call it.
- Purpose
- So routes bought in the Workspace follow exactly today's automatic-release rule (Nash's decision 2).
- How
GET /api/synchron/route-tokens/{state}/{route_token}/auto-approvalanswers 1 when the route already has 3 or more real orders (B12's count), so the purchase is the 4th counted use, exactly as Nash confirmed. It only reads, has no cache, and matches tokens as text or number. Protect it with the existing Synchron token now; it moves to signed calls with C1.- Done when
- It gives the same answer
permittokenwould give for a new real Synchron order on that route, checked by one test that compares the two. It answers in under 300 ms. - Confidence
- 90%
- Conflict
- None.
- Effort
- 0.5 day
B6The Express email: HHA recipients, and the client when there's no driver
- Status
- Waiting on Developer. Synchron's payload comes with its release, so test with sample data until then.
- Purpose
- Nash's decision 49 keeps this email for HHA orders. Today an email with no driver has no recipient and fails (
utils/auto_approval_email.py:558). Nash's D-1 now applies the fix to Synchron's own orders too: driver when there is one, otherwise the client. - How
- For
source = hha, take the recipients from the payload'srecipientslist:drivergoes in To.purchasergoes in To when there's no driver, otherwise in CC.truck_ownergoes in CC.- Skip placeholder and malformed addresses. If none is left, report
no_valid_recipient. - If the order is missing from the Brain's copy, fetch it from Synchron.
Synchron's own orders (D-1): keep today's path. Whendriver_idhas no usable email, send to the client (client_id, looked up in the Brain's copy of Synchron users,utils/auto_approval_email.py:310-325) as the To address, with no client CC. If neither has a usable address, don't send. Log it, and reportauto_approval_mail_sent: 0with a reason, never failing silently. - Done when
- Tests cover: an HHA order; a Synchron order with a driver (unchanged); a Synchron order with no driver (sent to the client); and no valid address on either (logged and reported, not sent).
- Confidence
- 85%
- Conflict
- Medium-low. It touches the live email worker. The with-driver path stays unchanged, and only the empty-driver case changes, which today always fails. Customers with no driver set will start receiving the route email, as Nash decided.
- Effort
- 1 day
B7Make the voice widget work at any address
- Status
- Waiting on Developer. Synchron moves its two estimator pages only after this ships.
- Purpose
- Three server addresses are written in as
heavyhaulagent.com(static/heavyhaul-widget.js:2-4), so voice would break at the address switch. - How
- Work out the server from the script's own link, as
static/logistics-bot-widget.jsalready does, with today's address as the fallback. Serve the chat icon from the Brain instead of the third-party site (line 463). - Done when
- The widget calls whichever host it was loaded from, and today's pages still work.
- Confidence
- 95%
- Conflict
- Low.
- Effort
- 0.25 day
B8Return the file fingerprint in each reading
- Status
- Waiting on Developer. Nash's N9: the same file on another trip is allowed, with no warning. So
duplicate_ofreports same-trip matches only, and must never lead to a cross-trip rejection or warning. - Purpose
- The Workspace checks duplicates itself (decision 6) and compares its fingerprint with the Brain's.
- How
- Add
file_sha256(already computed atroutes/workspace_updates.py:622, on the raw bytes, before conversion) andduplicate_ofto the response. - Done when
- For the same file, the fingerprint equals the Workspace's. A test shows a same-trip duplicate listed in
duplicate_of, and a cross-trip copy not listed. - Confidence
- 85%
- Conflict
- None. The fields are only added.
- Effort
- 0.25 day
B9Log which credential each Workspace call uses
- Status
- Review pending. Oct 19 telemetry branch is locally tested; it is not merged, deployed or live-verified.
- Purpose
- Before Synchron's shared token is changed, the traffic itself must show that no Workspace call still uses it (agreed with the Workspace).
- How
- Record
auth_method(client_credentialwith the client ID, orshared_token) for every/api/workspace/…call, never the secret. Today only trip-chat calls record it (routes/workspace_updates.py:115-124). - Done when
- Every Workspace call's log line shows which credential it used.
- Confidence
- 90%
- Conflict
- None.
- Effort
- 0.25 day
B10Hand the Workspace the existing reading of Synchron permits
- Status
- Waiting on Developer. Nash confirmed the Workspace will use it for every pushed Synchron permit, and that your history backfill uses it too. Synchron pushes when a permit is attached and calls
update-orderfirst, so "not ready" should be rare. Keep it for the case where the Brain's reading is still running. - Purpose
- Nash's rule: every real Synchron order (8 digits) is pushed into the Workspace, never practice orders (owner B005). Without this task, every pushed permit would be read by the AI models twice, across about 64,000 state items. The same route could also get two tokens, because the Workspace reading may run before the Brain has finished matching the Synchron reading.
- How
- Add an endpoint under
/api/workspace/…, using the Workspace's existing credentials. It takes an 8-digit order and a state item, and returns the Brain's existing reading from its order copy: permit fields, route token, route text, map links, and the GPX and Hammer links where they exist. If the Brain is still reading, it answers "not ready, try again". It never reads the permit a second time. - Done when
- For a Synchron order the Brain has already read, the endpoint returns the same route token Synchron received, without any model call.
- Confidence
- 95% Nash confirmed both users of it: the Workspace's live push and your backfill.
- Conflict
- None. It's a new read-only endpoint, and the existing reading path is unchanged.
- Effort
- 1 day
B11Route files for the Workspace (F12)
- Status
- Waiting on Developer to build and unit-test. The end-to-end test needs the staging Brain, which is approved (D-2) and is yours to set up (Waiting on Developer). The Workspace's receiver is Waiting on Workspace CTO, who is building it now.
- Purpose
- Purchased routes must arrive in the Workspace with their GPX and Hammer files. Today no path exists.
- How
-
POST /api/workspace/route-fileswith{trip_id, hha_permit_id, order_number, permit_token, route_token, route_version, map_urls[]}returns202 {job_id}.- Make the files once per permit and version, and store them per item, never in the shared
hammer_gpxrecord. Ignore an older version. - Send a signed
route_files.readyorroute_files.failed(reasons:map_link_unreadable,too_few_points,too_many_parts,geocoding_failed,internal_error, each withretryable) to/api/webhooks/brain. - Retry at 1 minute, 5 minutes, 15 minutes, 1 hour and 6 hours, then alert.
- Publish signed samples with a test secret.
- Done when
- Unit tests cover a ready event, each failure reason, a repeated version, an older version, and the signature. The samples are written.
- Confidence
- 90% Fully agreed with the Workspace CTO.
- Conflict
- Low. It reuses the GPX generator (
utils/hammer_gpx_generator.py) but writes its own collection, so Synchron's files are untouched. - Effort
- 2.5 days
B12Express count: real loads only (Nash's N8)
- Status
- Waiting on Developer to build, test, and produce the effect report. Switching it on in production: Waiting on Synchron CTO and Waiting on Nash. Both sign off on the effect report (Nash's answer to S-A).
- Purpose
- The count behind automatic release,
Frequency, goes up on every reading. That includes Synchron's own upload reading, for exampleutils/texas_route_processor.py:303-306, and itsupdate-orderreading (:190), which counts the same order twice. It also includes practice orders. Nash's N8: count one per real order, leave out practice orders and repeat readings, and keep release at the 4th counted use. - How
- One shared function,
real_order_count(state, route_token), counts the distinct tokens in the route'sOrder_Tokenslist, leaving out every practice order. Practice orders are the 2,542 tokens in Synchron's fileSynchron-training-and-test-order-tokens-carriers-43-49-2026-10-07.csv, loaded into a collection, plusorder.is_trainingonce Synchron sends it. auto_approval = 1when that count, including the current order, is 4 or more. That replacesFrequency > 3inutils/api_utils.py:176-184.- B5 and B4 call the same function, so all three always agree.
- Leave
Frequencyin the database untouched, as history. - Build it behind a setting,
EXPRESS_COUNT_RULE=frequency|real_orders, defaulting tofrequencyuntil Synchron has seen the effect.
- One shared function,
- Effect report (needed before rollout)
- For every catalog route, compare today's answer with the new one. List the routes whose
auto_approvalwould change. Check routes created through the upload-only path, whoseOrder_Tokenslist can be empty (for exampleutils/nevada_route_processor.py:243), so their real history may be under-counted. The Brain CTO decides with you whether those need a one-time rebuild from the Brain's order copies, then shares the report with Synchron. - Done when
- Tests cover a repeat reading of the same order (counted once), a practice order (not counted), 3 real orders (answer 0) and 4 real orders (answer 1). The effect report is written, and the setting is still on
frequency. - Confidence
- 95% Nash decided it, and the Brain already records
Order_Tokens. - Conflict
- Medium. It changes when some routes release on Synchron's own orders, by design. Some will release a little later. That is why it ships switched off and goes on only after Synchron has seen the effect.
- Effort
- 1.25 days, including the effect report
C. Groundwork: ready now
C0A branch and a test baseline, before any change
- Status
- Waiting on Developer
- Purpose
- To know what already passes before anything changes. The Brain has 16 unit test files.
- How
- Branch from
main(29514d3), runtests/unit, and record the result. - Done when
- The baseline is recorded.
- Confidence
- 100%
- Conflict
- None.
- Effort
- 0.1 day
C1Check Synchron's signatures, starting switched off
- Status
- Waiting on Developer to build. The final test vectors and secrets are Waiting on Synchron CTO, and arrive with the contract repository. That doesn't block building.
- Purpose
- Every Synchron call into the Brain will be signed (F5).
- How
- One check:
X-Synchron-TimestampandX-Synchron-Signature, a lowercase hex HMAC-SHA256 over timestamp + "." + the raw body (orGET path?query), a 300-second window, and the current and next secrets accepted. A setting chooses off, log or enforce, and the default is off. Front Desk calls are checked before the proxy rewrites the body (routes/frontdesk_proxy.py:71). - Done when
- On "log", every call is logged as signed or unsigned and none is blocked. Your own test vectors pass.
- Confidence
- 80%
- Conflict
- None while off or on log.
- Effort
- 1 day
C2Accept a current and a next token
- Status
- Waiting on Developer
- Purpose
- Today the Brain accepts exactly one token (
middleware/verify_internal_bearer.py:21-53), so changing it means a hard cut-over. - How
- Accept a list of tokens, compare them in constant time, and log which one matched. Do the same for the Front Desk token.
- Done when
- The old and new tokens both work during a changeover.
- Confidence
- 85%
- Conflict
- None while only one token is set.
- Effort
- 0.5 day
C3A stable Idempotency-Key on Brain calls into Synchron
- Status
- Waiting on Developer
- Purpose
- So Synchron can drop repeated calls safely (agreed in SB5).
- How
- A SHA-256 of the call type plus its business details. For
permittokenthat's the order, item, route token,edit_statusand permit fingerprint. Forupdate-order-logit's the item and job ID. Fororder/createit's the TMS client and its order reference. Store the key and reuse it on retries. Add it inutils/monitored_http.py. Keep the keys thatpermit-document-amountand Front Desk already send. - Done when
- A retry carries the same key, and a real re-edit carries a new one.
- Confidence
- 80%
- Conflict
- None. It's an extra header.
- Effort
- 0.5 day
C4Timeouts on reads from Synchron
- Status
- Waiting on Developer
- Purpose
- Six reads have no timeout:
utils/api_utils.py:16-23, and the carrier, truck, trailer, state and user controllers. One slow answer can hold a worker for 120 seconds. - How
- Add the same 30-second timeout every other call uses, and log any timeout.
- Done when
- No Synchron call waits longer than 30 seconds.
- Confidence
- 90%
- Conflict
- Low.
- Effort
- 0.25 day
C5Stop the order queue dropping orders
- Status
- Waiting on Developer
- Purpose
- When the queue's lock is busy, an order from
update-orderis dropped without a retry (queue_manager.py:15-19). A lock file left by a crash would drop every later order, so routes and GPX files would quietly stop updating. - How
- Retry the lock briefly. Remove a lock older than a few minutes. Log every case.
- Done when
- Two simultaneous orders are both queued, and a leftover lock doesn't block the queue.
- Confidence
- 85% It matters even more now that every Synchron order is pushed.
- Conflict
- Low.
- Effort
- 0.25 day
C6Read every route part, with a warning above 20
- Status
- Waiting on Developer
- Purpose
- The Brain stops at part 20 without warning (
controllers/order_controller.py:1131). Decision 50 says parts don't matter. - How
- Read every
route_url_Npresent, and warn above 20. - Done when
- A 25-part test route makes one GPX with all 25 parts.
- Confidence
- 70% Real routes reach 13 parts.
- Conflict
- Low.
- Effort
- 0.25 day
C7History of replaced route links
- Status
- Waiting on Developer
- Purpose
- Synchron asked for an audit trail. Today a corrected link overwrites the old one.
- How
- Before overwriting (
utils/waypoint_extractor.py:112-117), copy the old link to a separate collection. The catalog still holds only the newest link (decisions 47–48). Keep the history out of the catalog itself, because each state's routes are one MongoDB record, capped at 16 MB. - Done when
- Every replaced link can be found with its order, item and time.
- Confidence
- 70%
- Conflict
- Low.
- Effort
- 0.75 day
C8Settings instead of written-in addresses and keys
- Status
- Waiting on Developer
- Purpose
- Several values are written into the code, and they must be settings before the address switch:
- Synchron's address in
scripts/*.py; order@synchronpermits.com, in 8 places;- the Dimension Alert recipients. Keep exactly today's addresses as defaults, including the owner-authorized BCC (A3).
- the shared-key fallbacks for Synchron calls (
FRONT_DESK_AGENT/config.py:231-288,routes/allinone.py:92-94,utils/new_york_route_processor.py:17).
.env.example. - Synchron's address in
- How
- Turn each into a setting whose default is today's value. List every setting in
.env.example. Leave the key fallbacks working, but log every time one is used, so the four separate keys can replace them later. - Done when
- Nothing is written into the code, and the defaults behave exactly as today.
- Confidence
- 85%
- Conflict
- None with the defaults.
- Effort
- 0.5 day
C9A test that the trip AI never shows route links
- Status
- Waiting on Developer
- Purpose
- Today the assistant can't give away an unbought or canceled route (
logistics_bot/utils/tools.py:91-175). This test keeps it that way. - How
- Feed every assistant tool an order that contains map links, and assert that no link appears in the answer.
- Done when
- The test passes, and fails if a link ever appears.
- Confidence
- 80%
- Conflict
- None.
- Effort
- 0.25 day
C10Write down the Brain's side of the contract
- Status
- Waiting on Developer. It moves to the shared contract repository once that opens, which is Waiting on Synchron CTO and doesn't block writing it now.
- Purpose
- Everything agreed lives in letters. An engineer needs one document to build from.
- How
- Create
docs/integration/in the Brain repository, covering:- every endpoint and event the Brain offers or calls;
- the route-files samples and reasons;
- the error codes, the use-count rule and the auto-approval lookup;
- Front Desk (F10) and the full call list (F4).
- Done when
- Each B task can be built from the document alone.
- Confidence
- 85%
- Conflict
- None.
- Effort
- 0.5 day
C11Background jobs, part A (F8 A)
- Status
- Waiting on Developer. Part A needs no contract change. Part B, the two-step reading calls, is Waiting on Synchron CTO (scheduled for its phases 2–3) and is not part of this task.
- Purpose
- Synchron will start retrying its calls into the Brain. Today some Brain work runs in background threads that are lost if a worker restarts (
controllers/order_controller.py:450, 689), and a repeatedupdate-ordercan repeat work. With every Synchron order now pushed, the load grows. - How
- Reuse the durable job pattern the Brain already has (
ai_interview/repository.py:257-340): an atomic claim, attempts, backoff and stale-job recovery, run by a supervised worker.- Move
update-orderwork onto it, deduplicated per order, item and permit fingerprint. - Add stale-job recovery to
auto_approval. - Move the unit updates onto jobs.
- Add an ordering guard to the Front Desk callbacks.
- Move
- Done when
- A repeated
update-orderdoes no duplicate work, and a worker restart loses nothing. - Confidence
- 80% It's needed before Synchron turns on retries, though not for the first purchases.
- Conflict
- Medium. It changes how Synchron's live calls are processed. Build it behind a setting that switches between the old and new paths, and run both side by side in testing first.
- Effort
- 6–8 days
Your other actions: not code, also waiting on you
| Action | Why it's needed | Status |
|---|---|---|
| Send the Brain CTO the production server specifications | To size the lookup timing (under 300 ms) and the background jobs (C11). The owner says you will provide them (B040). | Waiting on Developer |
| Give Synchron your GitHub username | Synchron opens the shared contract repository (private, trcfleet organization) and needs the Brain team's usernames (its SB6). | Waiting on Developer |
| Record the production deploy time (UTC) of B1 | Synchron rebuilds every route-text row written before that moment (its SB4). Post it in the contract repository. | Waiting on Developer, after B1 |
| Check the production request log at the 11 failure times the Workspace sent | To confirm why the permits wouldn't read (all UTC: Sept 28 12:44:10; Oct 3 09:42:20 and 10:33:17; Oct 6 08:09:40, 08:10:49, 08:11:30, 10:21:36, 11:28:07, 11:29:36, 11:45:31, 11:52:56). | Waiting on Developer |
Check the last 30 days for any caller of /api/update-state and /api/update-user | Synchron says it never calls them. If nobody does, they can be retired before the move. | Waiting on Developer |
| Make a test copy of the database | So the two failing permit files can be tested without touching the live route catalog. Read on their own, they would write to it. | Waiting on Developer |
Confirm production has START_AUTO_APPROVAL_EMAIL_PROCESSOR switched on | Without it no Express email is sent at all (routes/core.py:81-95), and owner decision 49 keeps those emails. | Waiting on Developer |
| Run the history backfill through B10 (D-3). For each old real order, take the Brain's existing reading and route token, and read a permit again only where no usable reading exists. Leave out carriers #43 and #49. Write a reconciliation report (orders, permits, reused versus re-read, exceptions) and keep a rollback plan. | Nash's answer: the backfill is yours, and it reuses the Brain's readings so there's no second AI cost and no duplicate route token. Build B10 first. | Waiting on Developer, after B10 |
Pull the two failing permit files (N5): 1789834772_32.pdf and 1769964624_23.pdf, trip HH-878851361, from the Workspace's storage. Confirm their fingerprints, and keep them out of shared channels. | Nash's answer: you pull them yourself. You need read access to that one storage location. | Waiting on Developer · access: Workspace CTO |
| Staging Brain proposal (D-2): server specifications, proposed hostname, one-time and monthly costs, a test plan, and safeguards so test emails and callbacks never reach real users | Nash approved a separate staging Brain with no customer data, its own keys and its own address. You design and size it. It unblocks the end-to-end tests of B5, B10 and B11. | Waiting on Developer |
The list of other TMS clients (N6): export name, contact and the endpoints each client calls from the TMS client registry (models/tms_model.py:245, get_all_tms_clients), and the request log | The Brain team must notify every one at least 30 days before the address switch. The Brain CTO drafts the notice, and you supply the technical details, test with each client, and track their readiness. | Waiting on Developer |
Preserve the early-access sign-ups (N7): export the early-access-leads collection (models/early_access_lead_model.py:52) to a restricted location, and list anything that still links to the Brain's home page | Nash allows retiring the old home page and sign-up only after the sign-ups are preserved and the Workspace's home page works. The retirement itself waits on the Workspace (see below). | Waiting on Developer |
| Check the security of the owner-authorized BCC mailbox (A3), privately, without changing the routing | Nash keeps the personal Gmail BCC and asks that its access and security be assessed. Report privately to the Brain CTO, not in any shared channel. | Waiting on Developer |
Callback replay and C5 deployment note — October 15, 2026
This note responds to the CTO review of R1, R2, R4, one-order-per-trip, C4, C5 and B3. It records the operating instructions and the remaining production evidence; it does not claim a production result that has not been observed.
1. Replay schedule
Install the following cPanel cron entry on each Brain server, starting with staging. It runs the HHA-only callback replayer every five minutes, takes an OS lock so two cron invocations cannot overlap, and appends sanitized output to the application log.
*/5 * * * * /usr/bin/flock -n /home/heavyhaulagent/public_html/flaskapp/logs/replay_hha_callbacks.lock /home/heavyhaulagent/public_html/flaskapp/venv/bin/python /home/heavyhaulagent/public_html/flaskapp/scripts/replay_hha_callbacks.py --apply >> /home/heavyhaulagent/public_html/flaskapp/logs/replay_hha_callbacks.cron.log 2>&1Before adding it, confirm the host path with command -v flock; if it differs, substitute that result. The lock file stays in place. The operating-system lock is released when the process exits or crashes.
2. Read-only count of old untimed permits
Run this only on the production Brain server. It makes no writes because --apply is absent:
cd /home/heavyhaulagent/public_html/flaskapp
./venv/bin/python scripts/replay_hha_callbacks.pyThe JSON field untimed_trip_count is the requested count for untimed_hha_permit_query. Result: awaiting production command output. Do not run the apply command for these historical permits until the CTO decides.
3. C5 coordinated deployment and restart plan
- Schedule a short maintenance window. Record the deployed commit, the web-process manager, and every current cron/PM2/supervisor entry. Save
crontab -lbefore changing it. - Disable the old token-queue and callback-replay schedules, then stop every existing Brain web worker and managed Brain cron/PM2 worker. Wait until their process IDs are gone. Do not delete
logs/token_queue.lockor the replay lock file. - Deploy the new commit and dependencies while no old Brain process is running. Confirm the application points at one checkout and one virtual environment.
- Start the Brain web service, then start only the approved supervised workers. Reinstall the five-minute replay entry once. Start no duplicate manual replayer.
- Run the replay script once without
--apply; review the counts and logs. Then run a staging callback-before-sync test and confirm it returns 202, is stored once, and is replayed after the trip exists. - Re-enable traffic, record UTC restart time and process IDs, and monitor the queue, replay and web logs for 30 minutes. Roll back by stopping the new workers and restoring the saved cron configuration; do not remove lock files.
4. Commit explanations
d83cf20— route-email recovery now resumes only unsent work across delivery states and avoids duplicate messages after an SMTP attempt. Live status: not independently verified; confirm the running email processor uses this commit before calling it live.711aee2— adds Synchron state reconciliation and provision-PDF jobs in MongoDB, with an authenticated state callback and supervised worker. Live status: active on October 14; PM2 loggedsynchron_states_syncedfor 60 source states.
5. Remaining 503 in HHA callback handling
A new regression fix is prepared for review: if a Workspace trip disappears after the HHA callback finds it but before the route write commits, the callback is saved in workspace_hha_callback_inbox and returns 202. The scheduled replayer processes it once the trip is synced again. The focused callback suite passes 62 tests locally. This is not deployed.
6. B1 route text
B1 is deployed, as confirmed by the developer. The remaining evidence is the exact deployment time with time zone and Synchron's confirmation of the first live record under the October 13, 8:43 AM ET procedure.
Waiting on someone else: not ready yet
| Task | Status | What holds it back |
|---|---|---|
| Test the two permit files that fail | Waiting on Developer · access: Workspace CTO | You pull the files (Nash's answer) once you have read access to that Workspace storage location, and you make the test copy of the database. |
| End-to-end test of route files and the other Workspace calls | Waiting on Developer · Waiting on Workspace CTO | Staging is approved (D-2) and yours to set up. The Workspace's receiver is being built. |
Move to brain.heavyhaulagent.com | Waiting on Developer | The domain is confirmed (owner B037). You set up the subdomain on the server. If DNS isn't in your hands, tell the Brain CTO who controls it. B7 and C8 prepare the code. |
| Turn signature checks on, and change Synchron's shared token (F5 enforce, F11) | Waiting on Synchron CTO · Waiting on Workspace CTO | Synchron's secrets and test vectors. The Workspace's written confirmation that it uses only its own credential. |
| Use four separate scoped keys for the Brain's calls (F4) | Waiting on Synchron CTO | Synchron issues the keys in its phase 0. C8 prepares the code. |
| Use Synchron's tokens instead of its internal IDs (F9) | Waiting on Synchron CTO | Its lookup endpoints in phase 2, and its fix for regenerated truck and trailer tokens. |
| The two-step reading calls (F8 part B) | Waiting on Synchron CTO | Its callback endpoint, in phases 2–3. |
| Publish the route-text repair file | Waiting on Synchron CTO | Its repair of the 14,112 token rows, after Nash approves its plan. |
| Retire the old home page and early-access sign-up (N7) | Waiting on Developer · at the address switch | Nash's answer: the Workspace home page goes live at the switch. Retire the Brain's versions right after the Workspace confirms it works on heavyhaulagent.com, with the sign-ups already exported. |
| Send the TMS client notice (N6) | Waiting on Developer | It goes out at least 30 days before the switch, so it needs your client list and a switch date. |
The CTO of the Brain, HeavyHaul Agent