Project: Covert Cubicles Build Phase 6 / 7 \u00B7 3 of 6 modules complete

MODULE 22 / 31 \u00B7 LAYER 6 \u00B7 DATA_DECISIONCONSISTENCY \u00B7 RQ1 PRIMARY Per-Session Decision Consistency Aggregator

The RQ1 primary deliverable. Reads M17 morality records and produces structured per-session aggregates: the canonical final-mode measurement (RQ1 headline), the running-mode trajectory, and four summary statistics analysts choose between. Strictly per-session; cross-session aggregation is analyst territory.

DEPENDENCIES: SM_Game, ALMAA_Morality
Pending
RQ1 PRIMARY DELIVERABLE \u00B7 PER-SESSION CANONICAL MEASUREMENT
final.consistency is the headline. Everything else is supporting context.
M17 ALMAA_Morality produces per-decision raw records in two modes (running and final). M22 reads those records and produces the structured per-session aggregate analysts consume. The headline number for RQ1 is final.consistency — the canonical end-of-session Pearson correlation between pre-game survey values and in-game decision trajectory, clamped per ADR-042. Running-mode trajectory provides within-session context but is NOT directly comparable to final (per ADR-041); M22 keeps them strictly separated and never substitutes one for the other.
Running-mode persistence is an orchestration choice (ADR-063)
M17's getRunningScore() returns a transient query result; running scores are NOT auto-persisted to the moralityLog. Only recordFinalConsistency() persists. This means M22's trajectory only populates if the orchestrator (M31 GM_Game) explicitly logs running-mode entries via SM.appendMoralityRecord on each decision-commit. Until that integration decision is made, M22 surfaces whatever is in the log — empty trajectory if the orchestrator chose not to log running scores.

Automated Assertions

#AssertionResultDetail

Interactive Workbench — Live Aggregate Viewer

Drive the session lifecycle on the left; the per-session aggregate updates after each action. The trajectory chart shows running-mode consistency progression with the final-mode value (when present) drawn as a dashed reference line.

Session lifecycle harness
Session creation
Pre-game baseline (RQ1 input)
Decisions + log running entry per decision
Final consistency (RQ1 HEADLINE)
End session
Reset
Per-session consistency aggregate \u2014 computeConsistency()
hasComplete FALSE
final.consistency — null —
final.classification
final.rawPearson
baselineValues
Trajectory \u2014 running-mode progression
No running-mode entries logged yet. Use the lifecycle workbench to populate.
endpoint
— null —
Last running-mode value. Useful fallback when final is null.
mean
— null —
Smooths noise; less sensitive to endpoint volatility.
variance
— null —
Detects unstable trajectories; high = noisy session.
range
— null —
Distribution-free alternative to variance.
0 total records
0 running
0 final
Output schema v1.0 \u2014 ADR-066
FieldTypeDescription
Provenance
consistencyVersionstringSchema version of THIS aggregate (1.0)
computedAtISO 8601 UTCWhen the aggregate was generated
Headline (RQ1 canonical)
hasCompletebooleanTRUE iff a final-mode record exists. Filter on this for canonical RQ1 (ADR-065)
finalobject | nullCanonical final-mode record. Its consistency is the RQ1 headline.
Trajectory + stats
trajectoryarrayRunning-mode records in chronological order
trajectoryStats.endpointnumber | nullLast running consistency. Fallback when final is null.
trajectoryStats.meannumber | nullMean of running consistency. Smooths noise.
trajectoryStats.variancenumber | nullPopulation variance. Detects unstable trajectories.
trajectoryStats.rangenumber | nullMax - min. Distribution-free noise indicator.
trajectoryStats.nnumberCount of running-mode records
Diagnostics
totalRecordsnumberAll morality records (running + final)
runningRecordsnumberCount of running-mode records
finalRecordsnumberCount of final-mode records (typically 0 or 1)
baselineValuesobject | null{ pa, os, ei } from final or last running record's preGameValues

API Surface — Manual Verification

M22 has the smallest API of any module so far — three entries plus the version constant.