112 lines
6.7 KiB
Markdown
112 lines
6.7 KiB
Markdown
# SESSION_GENERATOR_V1 — active implementation record
|
|
|
|
Date: 2026-09-10. Baseline: `fd955315ccc9bb835a13eb94d206f1e01d893dfb`
|
|
(`feat(training): complete training knowledge v1`).
|
|
Status: **COMPLETED RECORD — `SESSION_GENERATOR_V1=PASS`**.
|
|
User authorization includes autonomous implementation, the approved additive
|
|
Android migration, new V3 exchange, validation and all required reviews.
|
|
No commit, push, staging, destructive Git or installed-app/data reset is allowed.
|
|
|
|
## Settled gates — do not restart research
|
|
|
|
- `ADVISOR_DECISION=PASS`, including a bounded representation clarification:
|
|
[architecture decision](session_generator_v1_architecture_review.md).
|
|
- `SESSION_GENERATOR_V1_SCIENTIFIC_REVIEW=PASS` for the final policy delta:
|
|
[bounded scientific review](session_generator_v1_scientific_delta_review.md).
|
|
- [Canonical policy](../../catalog/session-generation-policy-v1.json) is frozen
|
|
for implementation; [domain semantics](../domain/session_generation.md)
|
|
incorporates both decisions. The policy remains separately frozen and the
|
|
full tranche has passed.
|
|
- [Originating review](session_generator_v1_scientific_review.md) is historical
|
|
proposal evidence. Its 50%-MAX acceptance and numeric fallback tests are
|
|
explicitly superseded. No MAX-derived numeric target or rounding is allowed.
|
|
|
|
Numeric load uses the newest qualifying same-exercise/exact-equipment external
|
|
actual-dose occurrence within inclusive 28 days, with at least proposed count
|
|
of positive finite actual weights at repetitions >= target. Use the minimum
|
|
qualifying actual weight unchanged; otherwise absent. Legacy actual-only
|
|
none/zero-rest/null-target history can qualify only with exact known compatible
|
|
external equipment. It is not rewritten. Assistance and unknown context remain
|
|
excluded. Generated absent-weight plans use planned mode none, independently
|
|
of the equipment's resistance-context metadata.
|
|
|
|
Defaults, ranges, warning thresholds, scoring, coverage, and duration remain
|
|
those of the retained scientific proposal. Count performed work only, grouped
|
|
zones deduplicated with primary precedence, exact timestamp parsing, explicit
|
|
malformed-time failure, no measured-recovery claim.
|
|
|
|
## Architecture and implementation state
|
|
|
|
Desktop schema remains v11. Android v10 -> v11 adds the six planning columns
|
|
only to completed/draft occurrences, with truthful none/0/NULL defaults.
|
|
V3 session snapshots own targets atomically with ordinary occurrence data:
|
|
`trainlog-mobile-export-v3.json` and `trainlog-pc-mobile-export-v3.json`.
|
|
V1/V2 remain readable; V3 presence prevents fallback after failure. A legacy
|
|
same-ID replay against nondefault local planning metadata conflicts explicitly.
|
|
Preview is read-only. Accept creates the normal Android singleton draft only
|
|
if absent; an existing draft conflicts without mutation. Desktop uses its
|
|
normal in-memory session entry/editor/insertion path.
|
|
|
|
The persistence/V3 worker completed its bounded implementation and recorded
|
|
`/tmp/trainlog-session-generator-v1/persistence-v3-handoff.md`: Kotlin
|
|
SessionExercisePlan, schema migration, normal plan preservation, producer and
|
|
consumer V3, transport precedence, truthful structural fixtures and shared
|
|
cross-platform wire fixture. Initial validation passed 35 Android repository/
|
|
migration tests, assembleDebug, five affected Python suites, and sync_direction.
|
|
This is an intermediate worker result, not an independent engineering PASS.
|
|
|
|
The C/Kotlin engines, strict policy derivation/loading, streaming history,
|
|
owned bounded C inputs, full named scoring/coverage, dose edits, Android
|
|
repository and editable preview, normal-draft acceptance and TUI flow are
|
|
implemented. Independent validation passed Meson 45/45, focused ASan/UBSan
|
|
4/4, Android 73 tests with zero failures/errors and one external real-v9
|
|
fixture skip, public C17 headers, validators and deterministic regeneration.
|
|
The new structural Android v10 migration test ran and passed without a skip.
|
|
The bounded engineering delta review passed.
|
|
|
|
Exactly one deep final review ran and found three blocking gaps, retained in
|
|
[the final review](session_generator_v1_final_review.md). Its ONE bounded
|
|
repair chain is complete. V3-only exact timestamp validation is repaired on
|
|
both import/export implementations; focused tests prove rejection before
|
|
mutation, supported grammar admission and malformed-present-V3 precedence
|
|
over valid V2 through the actual Android inbox directory boundary. Handoff:
|
|
`/tmp/trainlog-session-generator-v1/v3-time-repair-handoff.md`.
|
|
|
|
The worker `session_generator_full_parity_repair` now owns full normalized
|
|
shared golden outputs and both C/Kotlin assertions, including score/coverage
|
|
and identity/equipment anchor ties. Production policy and engines remain
|
|
outside this test repair unless a demonstrated divergence requires repair.
|
|
Current documentation includes the bounded active-V3/rest-zero correction.
|
|
No separate generated-session history is authorized.
|
|
|
|
## Completion record
|
|
|
|
Exactly one deep final audit initially found three repairable gaps. Its one
|
|
authorized bounded repair chain closed V3 timestamp admission/publication,
|
|
complete shared 16-case C/Kotlin parity, and current V3 documentation. The
|
|
bounded repair review returned `BOUNDED_FINAL_REPAIR_REVIEW=PASS`; no second
|
|
broad final review ran. The final matrix passed Meson 45/45, named ASan/UBSan
|
|
4/4, Android 75 with zero failures/errors and one unavailable external-v9
|
|
fixture skip, validators, strict headers, deterministic regeneration and APK
|
|
asset comparisons. The structural Android v10 planning migration executed and
|
|
passed. This record has no outstanding executable work; the parent may perform
|
|
its final normal checks and evidence capture.
|
|
|
|
## Protection and retained evidence
|
|
|
|
Ticket evidence root: `/tmp/trainlog-session-generator-v1/`.
|
|
Original four proposals: `original-proposal/` beneath that root.
|
|
Baseline tracked hashes: `baseline-tracked-hashes.json`.
|
|
Baseline real desktop read-only preservation: `baseline-preservation.json`.
|
|
Desktop schema v11, integrity ok, no FK violations; 3 sessions, 31 occurrences,
|
|
28 performed sets, 19 MAX results, 6 continuous rows, 23 exercises, 3 custom
|
|
equipment definitions, 32 exercise-zone rows, 23 zone-sync rows and 1 body
|
|
observation. Compare the same logical-dump hashing method after implementation.
|
|
No real user DB, installed Android application, keystore, sync history, Git
|
|
index, commit or remote has been modified by this tranche.
|
|
|
|
The prior session's advisor thread-limit blocker was cleared in this session:
|
|
advisor, bounded anatomy review and two implementation workers launched.
|
|
There is no current infrastructure blocker. The exposed lifecycle interface
|
|
has no close-agent tool; completed review agents were collected and interrupted
|
|
using the only available lifecycle action. No role substitution was used.
|