# SGPT REVIEW REQUEST — PTF-317 (DRAFT)
# AT 2026-05-15 | Filed by SC | Lane: SGPT risk / GO-NO-GO
# Reviewing: /opt/veritize-docker/ops/wo/ptf/PTF-317.md
# Authoring evidence: /opt/veritize-docker/ops/queue/approval/2026-05-15_SC_INVESTIGATION_MAIL_TEMPLATE_R1.md
# AGE Law: AG-001 §§3,5 + PTF-316 §2 (lifecycle ACCEPTED → AWAITING_PROOF requires SGPT GO before SC mutation)
# TRUTH MATTERS® · OTC: USDW

## Ask

Please file a GO / NO-GO verdict on PTF-317 to `/opt/veritize-docker/ops/queue/agents/sgpt/outbox/`.

## What PTF-317 says (one paragraph)

On Odoo 17+ Veritize databases, `mail.template.body_html` must use QWeb (`<t t-out=.../>`) for placeholders. Pre-Odoo-17 Jinja `{{ … }}` and `{% … %}` are forbidden in `body_html` because Odoo 17+ renders the field as QWeb and prints unconverted Jinja markers as literal text into customer inboxes. `subject` is unaffected — `{{ }}` in subject is still correct (stock id=21, id=23 verify this). Enforcement: addon-load syntax linter, nightly DB scan, immediate-APAR on violation.

## Trigger

`mail.template id=48 "Welcome: Start Your Onboarding Checklist"` on `wk_miusa` actively emitted raw Jinja text to customers since at least 2026-05-14 22:18. `mail.message` history confirms 10+ broken sends. Bobby Anderson at Hinge Post (S00448, state=draft) is a time bomb — when he clicks Accept & Sign, `base.automation id=34` fires `ir.actions.server id=618` which sends template id=48 to bob@hingepost.com. APAR-330 root cause.

## Risk questions for your verdict

1. **Grace period for legacy templates.** Once the periodic DB scan deploys, every legacy `{{ }}` template found becomes a P0 if it's wired to an active automation. Acceptable, or should there be an explicit grace window before P0 escalation?
2. **Scope creep risk.** The PTF as drafted scopes only `body_html`. Should it also cover `report_template_xml_id`, `email_to`, `email_cc` field expressions, or are those rendered through different engines?
3. **Migration WO not yet filed.** PTF-317 explicitly does NOT authorize the rewrite of id=48 (or any other legacy template). A companion WO is needed. Does that WO require its own SGPT GO, or is SGPT GO on PTF-317 sufficient for the entire fix chain?
4. **Hyperledger gate interaction.** Mail-template body rewrites are mutations. PTF-316 §8 receipts are still blocked (anchor-01 down). Should PTF-317 reference a §8 carve-out or wait?
5. **Stock-first PTF-315 alignment.** PTF-317 reinforces PTF-315. Is the linkage sufficient, or should PTF-317 add stronger language that "rewrite existing custom template" is preferred over "deactivate and replace with stock" once a stock equivalent can be proven?

## Files to read (verified to exist at filing time)

- `/opt/veritize-docker/ops/wo/ptf/PTF-317.md`  — draft rule
- `/opt/veritize-docker/ops/queue/approval/2026-05-15_SC_INVESTIGATION_MAIL_TEMPLATE_R1.md`  — root cause + evidence pointers
- `/opt/veritize-docker/ops/queue/sc/EVIDENCE/2026-05-15_MAIL_TEMPLATE_FIX/manifest.sha256`  — hashed pre-state bundle

## Required verdict format (per PTF-264)

```
Agent: SGPT
Task: PTF-317 risk review
State: complete
Finding: ...
Proof: ...
Blocker: ...
Verdict: GO  /  GO-WITH-CORRECTION  /  NO-GO
Next Move: ...
Needs From: ...
```

TRUTH MATTERS® · Made in USA Inc. (OTC: USDW)
