4f31d0c8c5
CI / Contraintes NON-NÉGOCIABLES (CLAUDE.md) (push) Has been cancelled
CI / Validation JSON (schémas Faisabilité) (push) Has been cancelled
CI / Qualité documentaire (liens + 4Big) (push) Has been cancelled
CI / Reproductibilité des artefacts out/ (build == commité) (push) Has been cancelled
CI / Fraîcheur matrice de régression (run == commité) (push) Has been cancelled
CI / Intégrité du câblage CI (gate agrège tout · gates statiques verrouillés) (push) Has been cancelled
CI / Intégrité des chiffres du README (valeur == artefact cité · (push) Has been cancelled
CI / Publiciste · parser + schéma + generator (unittest) (push) Has been cancelled
CI / RBAC · 50 rôles + schéma (unittest) (push) Has been cancelled
CI / Faisabilité · générateur 4 volets + round-trip (unittest) (push) Has been cancelled
CI / RBAC · fixtures ERPNext (Role + Custom DocPerm) (push) Has been cancelled
CI / RBAC · plan User Permission (row-level) (push) Has been cancelled
CI / RBAC · Role Profile (bundles par portail) (push) Has been cancelled
CI / RBAC · run-book d'application unifié (agrégat 3 volets) (push) Has been cancelled
CI / Faisabilité · dossier bancable trilingue FR/EN/ES (push) Has been cancelled
CI / CRM · workflow vente ERPNext (lead → CONFOTUR) (push) Has been cancelled
CI / CRM · DocType porteur OTO Dossier Vente (push) Has been cancelled
CI / CRM · barème commissions vendeurs (push) Has been cancelled
CI / CRM · Financement Bancaire (gate hypothécaire RD) (push) Has been cancelled
CI / Fiscal · e-CF DGII (Compupar) (push) Has been cancelled
CI / Frontend · Workspaces 5 portails rôle (push) Has been cancelled
CI / Legal · DocType CONFOTUR Application (push) Has been cancelled
CI / QA · Audit 5D conformité (push) Has been cancelled
CI / SEO · mots-clés trilingues + schema.org + hreflang (push) Has been cancelled
CI / Chat OTOIA · montage par portail (Custom Block) (push) Has been cancelled
CI / QA · Audit 4Big (95+/100 sur 100% deliverables) (push) Has been cancelled
CI / Démo · Scénarios (run-sheet P07 banquier / P05 client) (push) Has been cancelled
CI / QA · Matrice de régression exhaustive (Sprint 8) (push) Has been cancelled
CI / DevOps · Run-book de déploiement VPS unifié (Sprint 8) (push) Has been cancelled
CI / QA · Matrice d'acceptation / traçabilité MVP (Sprint 8) (push) Has been cancelled
CI / Mobile · config app Expo/EAS (navigation par rôle) (push) Has been cancelled
CI / PIE · manifest de dépendances (Annexe 12 · V10.1) (push) Has been cancelled
CI / E2E baseline Playwright (manuel) (push) Has been cancelled
CI / Gate qualité (agrégat) (push) Has been cancelled
101 lines
3.8 KiB
Python
101 lines
3.8 KiB
Python
"""Assemblage déterministe du manifest PIE depuis `pie_spec.json`.
|
|
|
|
Entrée : le contrat PIE (taxonomie Project Master Data, registre downstream,
|
|
règles de synchronisation, workflow 10 étapes, marques, storage layout) —
|
|
transcrit VERBATIM de la directive PIE (SSOT · #6, aucune valeur inventée).
|
|
Sortie : un bundle déterministe (tri stable, aucun horodatage) → reproductible
|
|
bit-à-bit à contrat constant, donc diffable et re-générable en CI
|
|
([[artifact-reproducibility-gate]]).
|
|
|
|
Le builder n'ajoute AUCUN chiffre propre à OTO : il résout le `statut` de chaque
|
|
livrable downstream (« gated » si un module de livrado réel l'implémente déjà,
|
|
sinon « a_construire ») et un manifeste de traçabilité (comptes dérivés).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from . import deps
|
|
|
|
|
|
def _statut(module: str | None) -> str:
|
|
"""« gated » si un module réel implémente déjà le downstream, sinon « a_construire »."""
|
|
return "gated" if module else "a_construire"
|
|
|
|
|
|
def build_bundle(spec: dict) -> dict[str, Any]:
|
|
"""Transforme le contrat PIE en manifest de dépendances + manifeste de traçabilité."""
|
|
groups = sorted(spec["master_data_groups"], key=lambda g: g["cle"])
|
|
|
|
registry = [
|
|
{
|
|
"cle": d["cle"],
|
|
"libelle": d["libelle"],
|
|
"module": d["module"],
|
|
"statut": _statut(d["module"]),
|
|
}
|
|
for d in sorted(spec["downstream_registry"], key=lambda d: d["cle"])
|
|
]
|
|
|
|
sync_rules = [
|
|
{
|
|
"trigger": r["trigger"],
|
|
"trigger_group": r["trigger_group"],
|
|
"downstream": list(r["downstream"]), # ordre directive préservé (§82-86)
|
|
}
|
|
for r in sorted(spec["sync_rules"], key=lambda r: r["trigger"])
|
|
]
|
|
|
|
workflow = sorted(spec["workflow"], key=lambda s: s["etape"])
|
|
brands = sorted(spec["brands"], key=lambda b: b["code"])
|
|
|
|
manifest_out = {
|
|
"engine": spec["engine"],
|
|
"annexe": spec["annexe"],
|
|
"version_workflow": spec["version_workflow"],
|
|
"ssot": spec["ssot"],
|
|
"source_spec": "pie_spec.json",
|
|
"master_data_groups": groups,
|
|
"downstream_registry": registry,
|
|
"sync_rules": sync_rules,
|
|
"workflow": workflow,
|
|
"brands": brands,
|
|
"storage_layout": spec["storage_layout"],
|
|
}
|
|
|
|
gated = [d for d in registry if d["statut"] == "gated"]
|
|
a_construire = [d for d in registry if d["statut"] == "a_construire"]
|
|
|
|
traceability = {
|
|
"generated_from": "pie_spec.json",
|
|
"claude_md_source": "CLAUDE.md",
|
|
"directive_source": spec["directive"],
|
|
"engine": spec["engine"],
|
|
"annexe": spec["annexe"],
|
|
"version_workflow": spec["version_workflow"],
|
|
"ssot": spec["ssot"],
|
|
"counts": {
|
|
"master_data_groups": len(groups),
|
|
"downstream_total": len(registry),
|
|
"downstream_gated": len(gated),
|
|
"downstream_a_construire": len(a_construire),
|
|
"sync_rules": len(sync_rules),
|
|
"workflow_steps": len(workflow),
|
|
"brands": len(brands),
|
|
},
|
|
"modules_gated_references": [
|
|
{"cle": d["cle"], "module": d["module"]} for d in gated
|
|
],
|
|
"note_anti_invention": (
|
|
"Toute donnée est transcrite de la directive PIE (SSOT · #6) : aucune "
|
|
"valeur projet (prix, surfaces, marges) n'est fabriquée ici — le PIE "
|
|
"les EXTRAIT de la faisabilité validée côté VPS (/opt/oto/data/pie/{code}/, "
|
|
"jamais écrit par ce worker · #8). Les codes projets sont ancrés à "
|
|
"CLAUDE.md §Projets ; annexe/version à la directive ; les modules "
|
|
"downstream « gated » à des répertoires de livrables réels."
|
|
),
|
|
}
|
|
|
|
return {"manifest": manifest_out, "traceability": traceability}
|