Files
second-brain/03-records/journal/2026-09-24.md
T
kiskaadee 8a59b093b8
Brain Structural Validation / Validate Markdown Structure & Links (push) Failing after 8s
infra(validator): add DirectoryContract validation and migration manifest
2026-09-28 15:58:11 -05:00

6.7 KiB

type, project, date, tags
type project date tags
journal praxis 2026-09-24
praxis
architecture
planning
srs
domain-model
oop
ddd

Daily Journal: 2026-09-24

Wins

Praxis Project Inception & Workspace Scaffolding

  • Initialized and scaffolded the brand-new workout execution and habit-tracking project Praxis at ~/Projects/active/praxis.
  • Configured canonical upstream Git forge on self-hosted Gitea (ssh://git@gitea.roadtotech.me:2223/kiskaadee/praxis.git, Gitea repository) with GitHub (kiskaadee/praxis) configured as automated push mirror.
  • Configured local development environment with Python 3.12, uv package manager (pyproject.toml, uv.lock), .envrc, and clean hexagonal architecture structure.

Domain Design & Architectural Specifications

  • Established the foundational Three-Layer Temporal Model:
    • Prescription: Reusable Routine templates, weekly schedules, target exercises, and multi-week Progression Phases.
    • Performance: Concrete WorkoutSession execution instances freezing an immutable SessionPrescriptionSnapshot while granting total runtime autonomy.
    • Analysis: Pure deterministic derivation of adherence rates, metric-dependent workload volumes, and factual exercise histories without mutable counters.
  • Codified key domain contracts and invariants:
    • Snapshot vs. Execution Mutability: Frozen prescription snapshot upon session initiation; execution remains mutable until finalization (Completed, Partially_Completed, Skipped).
    • Substitution History Isolation: Substituted movements contribute strictly to the performed exercise history, preserving audit linkage to the planned exercise.
    • Set-Intent Completion Policy & Factual Adherence: Consistency tracked via distribution metrics (Completed, Partially_Completed, Skipped, and Set Adherence Rate) rather than fragile streak mechanics.
    • Decoupled Identity: Internal UserId domain abstraction isolated behind an AuthProvider port (supporting Authelia ForwardAuth headers and LLDAP).

Knowledge Graph Curation


Planning & Specifications


Architecture & Design Decisions

Snapshot Immutability vs. In-Flight Execution Autonomy

Routine templates must represent aspirational intent, not immutable dogma. Freezing a SessionPrescriptionSnapshot at workout initiation decouples past performance from subsequent template edits, while allowing the user to adapt on the fly (reordering exercises, adjusting weights or rep ranges, swapping machines, or logging ad-hoc sets) without polluting the routine definition.

Factual Adherence over Gamified Streaks

Conventional fitness applications encourage dishonesty and cognitive stress by imposing fragile binary streak counters that reset on missed days. Praxis models adherence as factual distribution rates over sliding windows, separating set-level completion intent from binary day attendance.


Phase 0 Complete: Praxis Implementation Readiness

Toolchain Hardening & Blueprint (v0.2.0)

Session completed a full Phase 0 implementation-readiness pass on the Praxis repository:

  • Blueprint v0.2.0 finalised: translated SRS v1.0.2 + Domain Model v1.0.1 into concrete Python decisions — package structure, dependency direction, immutability strategy (@dataclass(frozen=True) value objects, @dataclass(eq=False) entities), ID representation (newtype frozen dataclasses over uuid.UUID), and SetData as explicit frozen VO to prevent record_set()/MetricValidationPolicy divergence.
  • Resolved all Phase-1-blocking ambiguities (OQ-2: Phase.end_week = None → return last phase; ValueError on empty phases list). Remaining OQs (OQ-1, 3, 4, 5) formally deferred.
  • Established pyproject.toml toolchain: ruff (E/W/F/I/UP/B/C4/SIM/RUF/N/ANN/PT/TCH, line 100, Python 3.13), pyright strict mode, pytest with --strict-markers and 90% branch coverage gate.
  • Implemented Git hooks: pre-commit (ruff format + check + re-stage), pre-push (pyright strict + pytest -m unit), and one-shot install-hooks.sh.
  • Expanded AGENTS.md with §5 Toolchain & Static Analysis Constraints, §6 Git Hook Workflow, and tightened §7 Rules of Engagement.

Repository now at Phase 1 start: identifiers → enums → measurement → RepRange → SetData → Exercise → Routine → MetricValidationPolicy → SessionSnapshotFactory → WorkoutSession → CompletionPolicy → WorkloadCalculator → AdherenceCalculator.

📋 Praxis Implementation Blueprint (v0.2.0)


Incidents & Debugging

  • Diun Load-Shaping, Workload Exemption & Authenticated SMTPS Delivery (2026-09-24): Resolved 6 classes of post-deployment issues on the Core Diun notifier. Root causes: bcrypt $ interpolation from deprecated Portainer secrets (resolved by full Portainer deprecation), high-concurrency registry scan load factor mitigated via DIUN_WATCH_WORKERS=6 + DIUN_WATCH_JITTER=30s, local-build image exemptions decentralized to Sites/* compose manifests via diun.enable=false, and authenticated SMTPS delivery migrated from unauthenticated port 25 to port 465 with dedicated notifier@roadtotech.me service account projected via SOPS. All 19 upstream images now scan cleanly with zero failures; mail lands in INBOX with auth=pass.