Skip to content

[TRACKING] Epic #26 — single ownership of the Appwrite environment #29

Description

@Polichinel

Tracking checklist for #26 — [EPIC] Establish single ownership of the Appwrite environment.

Cross items off as they land. The order below is the implementation order; dependencies are noted where they constrain it.

Checklist

  • views-appwrite#27 · S1 — Contract states the single-writer rule · needs-decision
    No dependencies. Blocks S3 and S5. Amends the contract directly rather than convening a þing — the operator can override that call, in which case the epic waits.
  • views-models#308 · S2 — Registry resolution must fail loud (C-47)
    No dependencies. Do this first among implementation items — the relative sibling hop is the single thing most likely to break the next machine set up.
  • views-pipeline-core#377 · S4 — model_path.py:371, the surviving library dotenv load · needs-decision
    Independent. A genuine judgment call, filed as one: self.root/".env" may be a legitimate entry point. What must not happen is that it survives because nobody looked — which is how it survived #346.
  • views-appwrite#28 · S6 — Prove the two registry_to_env.py copies agree (C-50)
    Independent. Does not challenge the two-copies decision — that is WET-before-DRY correctly applied. Adds the missing check.
  • views-models#310 · S7 — Make the 131 generated run.sh explicit as clones
    Independent. Not deduplication — they do not touch Appwrite, and CRP says leave them apart. One header line so the duplication is visible.
  • views-models#309 · S3 — tools/platform_env.sh: one writer (C-48)
    Depends on S1 + S2. The centre of the epic. The extraction is not the point; the contents are — it must not source .env for coordinates.
  • views-faoapi#349 · S5 — Resolve the 7 coordinates from the registry
    Depends on S1. Reduces this repo's .env to one secret.
  • views-models#311 · S8 — bootstrap.sh, CI-tested without credentials
    Depends on S2 + S3. The epic's real test. Hard constraint: if it needs arguments or a companion document, the structure underneath is still wrong.
  • S9 — The onboarding guide's [Internal Tech Guide] link is empty docs#82 · S9 — The onboarding guide's [Internal Tech Guide] link is empty
    Depends on S8. Documentation last, deliberately — by then the setup path is a program that must work.
  • views-faoapi#350 · S10 — views-crafdapi adopts the pattern at birth
    Depends on S5. Filed in views-faoapi because the clone has no tracker yet; move it when it gets one.

Completion criteria

The epic is done when all ten boxes are ticked and:

  • Exactly one writer per class of value — registry owns coordinates, operator owns the secret; a second writer errors rather than losing silently
  • No importable library loads a .env anywhere on the platform
  • Registry resolution failure exits non-zero; no warn-and-continue
  • views-faoapi's .env requires one variable
  • bootstrap.sh green in CI with no real credentials — and followed end-to-end on a machine that had never run the platform, with every failure recorded rather than worked around
  • The onboarding guide's technical pointer resolves
  • views-crafdapi never acquires a second .env habit
  • Both registry_to_env.py copies proven to emit identical output

Not this epic — cross-linked, not re-scoped

views-faoapi#337 Extract the credential/partition contract to views-appwrite. Gated on þing-01 D8, which is views-appwrite#23. Those two are the same decision from opposite sides. views-crafdapi existing now satisfies one of #337's two trigger conditions; #23 is the other
views-pipeline-core#339 The Appwrite eviction epic, Phases 0–2
views-models#298 / #299 Liveness .env; .gitignore gaps
views-postprocessing#187 Registry drift detection

Already shipped — verified against current HEADs, not assumed

views-pipeline-core#346 (find_dotenv deleted, preflight everywhere, AppwriteConfig frozen) · views-faoapi#322 and #323 (both in v1.4.0) · views-appwrite#13 (conformance vector).

The finding this epic rests on

Two mechanisms write coordinates into the process environment. The registry wins because it runs second. Against Rust's stated definition of a data race — two or more pointers to the same data, at least one writing, no synchronising mechanism — all three conditions hold.

That reclassified the problem from tidiness to correctness, and it is why the system was hard to hold in your head: its ownership is genuinely undefined. The seam contract §2 already mandates the fix; the shell layer structurally cannot express it, having no parameter passing to child processes — only the global environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicLarge body of work broken into storiesplanningDecision or design work, no code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions