# SC_DONE — DUAL-P0 STATUS SWEEP (READ-ONLY)

| Field | Value |
|---|---|
| Agent | SC |
| Task | Status sweep — Datacert APAR-003/008 + MIUSA S00458 stack |
| State | DONE (evidence-only; no mutations) |
| Dispatch | AR "GO" 2026-05-17 (status sweep, not execution) |
| Filed | 2026-05-17 00:43 UTC |
| Authority | Read-only investigation per AR directive "Status sweep first" |
| Mutations | NONE |
| AGE | Check-In not required (no mutation). Evidence filed for CC/AR routing. |

---

## FINDING 1 — DATACERT APAR-003 + APAR-008 ARE CODE-RESOLVED ON DISK

**Server:** svr01.dataveri.ai (161.35.103.13) — Michelle Tan's box, SC-authorized.

### Evidence

`/home/datacert/public_html/assets/gemwallet-verify.js`
- Exists. 21,249 bytes. Owner `datacert:datacert`. mtime `May 16 23:11` (server time).

`/home/datacert/public_html/verify.html` line 128:
```
<script src="/assets/gemwallet-verify.js?v=20260516231115"></script>
```

Live `verify.html` input IDs:
```
id="domain"       id="wallet"       id="walletDeepLink"
id="walletModal"  id="walletModalMeta"  id="walletModalMsg"
id="walletModalTitle"  id="walletQrBox"
```

JS selector coverage (grep on the live file):
```
getElementById('dc-domain')   getElementById('domain')
getElementById('dc-wallet')   getElementById('wallet')
querySelector('input[name="domain"]')
querySelector('input[name="wallet"]')
querySelector('input[placeholder*="domain" i]')
querySelector('input[placeholder*="XRP" i]')
```

`detectGemWallet` references: 1× in verify.html, 5× in gemwallet-verify.js.

### Read-out
- APAR-003 (regression — inline retry detection overwritten by deploys): RESOLVED on disk. Standalone JS is wired in. HTML patches will not touch it.
- APAR-008 (selector mismatch `#dc-domain` vs `#domain`): RESOLVED on disk. Both bare and prefixed IDs are queried; label/placeholder fallbacks present.

### What this sweep CANNOT prove
- Whether browser execution succeeds end-to-end (would require headless browser run, not curl).
- DOM-resolution smoke per APAR-008 lesson (selector→element binding live in JS runtime) is not part of the current deploy script and was not run here.

### Next move (NOT taken — needs CC dispatch)
Add the DOM-resolution smoke block from APAR-008 lines 38-57 to `deploy-gemwallet-standalone.sh` and run a verification pass. SC will not modify scripts without WO + SGPT GO.

---

## FINDING 2 — wk_miusa IS PRODUCTION; S00458 EXISTS; PREVIOUS PROBE WAS WRONG

**Server:** wksvr (10.116.0.3 VPC) — odoo_miusa container, DB `wk_miusa` on DO Managed PG 17.

### Stack reality
```
odoo_veritize  127.0.0.1:8069  → wk_veritize
odoo_miusa     127.0.0.1:8070  → wk_miusa (dbfilter=wk_miusa)
miusa-odoo     does not exist (docker inspect: "no such object")
```

Confirms Austin Recon M1: only one MIUSA stack on wksvr.

### S00458 lookup
```
sale_order  id=458  name=S00458  state=sent  partner_id=61
            create_date=2026-05-14 22:21:00 UTC
```
S00458 is real, in `wk_miusa`, current state `sent`.

### Module install state (rejects the 2026-05-14 "barebones" claim)
```
account             installed
crm                 installed
mail                installed
payment             installed
sale                installed
sale_management     installed
website             installed
website_sale        installed
project             uninstalled
purchase            uninstalled
stock               uninstalled
```

The 2026-05-14 Sales Ops ERP Probe report saying `sale_management` was uninstalled is contradicted by this query. Either the probe queried the wrong DB, or modules were installed after that probe ran.

### Mail templates on `sale.order`
```
21  'Sales: Send Quotation'           STOCK
22  'Sales: Send Proforma'            STOCK
23  'Sales: Order Confirmation'       STOCK
24  'Sales: Payment Done'             STOCK
25  'Ecommerce: Cart Recovery'        STOCK
48  'Welcome: Start Your Onboarding Checklist'   CUSTOM
```

### S00458 mail history (most recent first)
```
3652  2026-05-15 17:51:23  subject='S00458'                           V Bot
3587  2026-05-14 22:21:16  subject='S00458'                           V Bot
3586  2026-05-14 22:21:04  notification                               Adam David Reiser
3585  2026-05-14 22:21:04  'Your order is confirmed — start your onboarding checklist'  info@miusa.one (auto_comment)
3583  2026-05-14 22:21    'Your order is confirmed — start your onboarding checklist'  info@miusa.one (auto_comment)
3582  2026-05-14 22:21    notification                               Adam David Reiser
```

Template id=48 (CUSTOM) is what fired on S00458 — twice on 2026-05-14 22:21, sender `info@miusa.one`, type `auto_comment`. The two later messages (3587, 3652) are V Bot internal notifications, not customer emails.

### Template id=48 body (first 1500 chars, verbatim)
```html
<div style="font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;max-width:600px;margin:0 auto;color:#1E293B;">
    <p>Hello {{ object.partner_id.name }},</p>
    <p>Thank you for your order.</p>
    <p>Your account is ready for the next step. Use the portal to begin onboarding, submit required intake details, and track your progress.</p>
    <p style="margin:24px 0;">
        <a href="{{ (object.get_base_url() or '').rstrip('/') }}/onboarding/start" style="...">
            Start Onboarding
        </a>
    </p>
    <p>
        Order reference: <strong>{{ object.name }}</strong><br/>
        Program: <strong>{{ object.order_line[:1].product_id.name if object.order_line else 'Your certification program' }}</strong>
    </p>
    <p>Need help before you begin? Reply to this email and our team will assist you.</p>
    <p style="margin-top:32px;font-weight:600;">TRUTH MATTERS® — Adam Reiser, Founder &amp; CEO, Verity One Ltd.</p>
    <p style="color:#94A3B8;font-size:12px;">Made in USA Inc. (OTC: USDW)</p>
</div>
```

### Read-out
- Template id=48 IS what AR saw rendering raw Jinja. It uses `{{ object.* }}` syntax (Odoo 19 native template language) which SHOULD render through the `mail.template.send_mail()` pipeline. If raw `{{ }}` appeared in the customer email, the template was fired through a path that bypassed Odoo's template rendering (e.g., a `mail.mail` write with un-rendered `body_html`).
- The handover directive ("revert to stock") translates to: remove or unpublish template id=48 from automated triggers on `sale.order`, and let Odoo stock templates 21-25 run. Template 48's brand body content is reusable but should not be the default quote-sent trigger.
- The 2026-05-14 dispatch's premise (sale_management uninstalled) is FALSE on current state. The "barebones" finding was either a wrong-DB probe or has been superseded by an install since 2026-05-14.

### What this sweep did NOT do (per AR directive)
- No mail template edits
- No module installs / uninstalls
- No template id=48 unpublish
- No payment provider configuration
- No portal verification
- No resend of S00458

---

## ROUTING — DECISIONS NEEDED FROM CC

1. **Datacert APAR-003 / APAR-008:** Code looks resolved on disk. Functional verification needs browser smoke. Open question: do these APARs get closed via a verify-now task, or does CC want SGPT to write a DOM-resolution smoke first?

2. **MIUSA / S00458:** Two competing facts to reconcile:
   - 2026-05-14 ERP Probe: "wk_miusa is barebones, sale_management absent"
   - 2026-05-17 sweep (this report): "wk_miusa has sale_management installed, S00458 exists, custom template id=48 fired"

   Most likely: the 2026-05-14 probe ran against the wrong DB or another stack got modules installed after it. Either way, restoring stock email behavior is now a template-precedence problem (unpublish/retire id=48), not a module-install problem. WO scope needs adjustment before SC executes.

3. **AGE compliance:** Both fronts need a fresh WO + APAR + PTF + Check-In before SC mutates anything. The 2026-05-14 RESTORE_MIUSA_PRODUCTION dispatch is partially stale — its step 1 ("identify stack") is now resolved, step 3 ("restore stock email template") is the actionable remainder.

---

## EVIDENCE PATHS

- This file: `/opt/veritize-docker/ops/queue/approval/2026-05-17_SC_DONE_STATUS-SWEEP-DUAL-P0.md`
- Datacert prior APARs: `/opt/veritize-docker/ops/governance/session-2026-05-16/APAR-2026-05-16-{003,008}-*.md`
- MIUSA prior dispatch: `/opt/veritize-docker/ops/queue/sc/P0_NOW/RESTORE_MIUSA_PRODUCTION.md`
- Prior probe (contradicted): `/opt/veritize-docker/ops/queue/approval/2026-05-14_SC_DONE_SALES-OPS-ERP-PROBE.md`

TRUTH MATTERS® · OTC: USDW · CAGE 8JSY1
