KB-1E3D rev 2
5000x-live — Nuxt factory deploy package (exact blocker)
5 min read Revision 2
iu-core5000x-livenuxtdeploy-packageexternal-blockerhygiene-repaired-by-6000x
5000x-live — Nuxt factory deploy package (exact blocker)
Hygiene note (6000x): title/tags renormalised from "5500x" to "5000x-live" to match the path. Content preserved verbatim except this banner.
Verdict: DONE_WITH_EXTERNAL_BLOCKER — frontend/DevOps owns build/restart.
Artifact reproducibility
- Factory entry:
cutter_agent/iu_core/ui_factory.py(load_descriptor + generate) - Descriptor:
ui-package/nuxt-three-axis-factory/descriptors/iu_three_axis_envelope.json - Templates:
ui-package/nuxt-three-axis-factory/templates/(4 templates) - Generated digest (regenerated this macro):
413143da9efa51bfea3a9f4ae74f3b26e4697a30932147566c8f9d1c54c7636e— byte-identical to committedgenerated/iu_three_axis_envelope/(digest matches). - 4 files:
pages/admin/iu-three-axis.vue,composables/useIuThreeAxis.ts,runtimeConfig.snippet.ts,compose.snippet.yml.
Deploy gates (all PASS — substance only, no execution)
| Gate | Status | Verification |
|---|---|---|
| Factory-only (no hand-coded Nuxt page) | PASS | Generated from descriptor + templates; templates carry no IU-specific field name |
| No PG access | PASS | Composable imports @directus/sdk + readItems/aggregate only; no pg/postgres reference |
| No business logic for IU semantics in Nuxt | PASS | Composable is schema-agnostic; field names injected from descriptor at generation |
| No hardcoded collection name | PASS | Reads useRuntimeConfig().public['iuCoreDirectusCollection'], throws if unset |
| Compatible with live Nuxt env | PASS | Live repo /opt/incomex/docker/nuxt-repo/web has useDirectus<> composable at modules/directus/runtime/composables/useDirectus.ts; same pattern as composables/useKnowledge.ts |
| No path overlap | PASS | Live pages/admin/ has knowledge-tree, super-session, users; iu-three-axis.vue is new |
| axis_b_tags dict-shape robustness | PASS | flattenAxisBTags(raw) accepts both string[] and Record<string,string[]>; defect inherited from 4000x found+fixed in 5000x and re-validated against real DIEU-35 data this macro |
Exact deploy patch (what frontend/DevOps must apply)
-
Add 2 files to
/opt/incomex/docker/nuxt-repo/web/:pages/admin/iu-three-axis.vue← copy fromui-package/nuxt-three-axis-factory/generated/iu_three_axis_envelope/pages/admin/iu-three-axis.vuecomposables/useIuThreeAxis.ts← copy fromui-package/.../composables/useIuThreeAxis.ts
-
Edit
nuxt.config.ts— merge intoruntimeConfig.public:iuCoreDirectusCollection: process.env.IU_CORE_DIRECTUS_COLLECTION || 'iu_three_axis_envelope', -
Add env var to
/opt/incomex/docker/docker-compose.ymlundernuxt:serviceenvironment::IU_CORE_DIRECTUS_COLLECTION: iu_three_axis_envelope -
Build + restart:
cd /opt/incomex/docker/nuxt-repo/web pnpm install --frozen-lockfile # 1-3 min pnpm run build # 3-5 min sudo rsync -a --delete .output/ /opt/incomex/deploys/nuxt-output/ docker restart incomex-nuxt # only this container -
Smoke (post-restart):
curl -sS https://ai.incomexsaigoncorp.vn/admin/iu-three-axis -H 'Cookie: <auth>' | head -5Expected: 3-axis tabs render, axis A groups by
axis_a_doc_code(DIEU-35/28/32), axis B by tag, axis C by depth.
Exact blocker
- VPS-side
pnpm installrequires network egress to npm registry;web/node_modulesis missing on VPS — fresh install needed. web/.outputis missing — full build required.- Image
nuxt-ssr-local:s174in docker-compose differs from runningnuxt-ssr-local:d28gmr-1778407456— the live image is from an out-of-band build (d28gmr-epoch tag); frontend/DevOps owns this build pipeline. - Auto-snapshot pattern in git log (
auto-snapshot: 1 files (...)commits every ~12h) indicates an automated PR/build flow onHuyen1974/web-test.git. Deploy SHOULD route through this flow, not via ad-hoc host build.
Reversibility
- Drop the 2 new files; remove the env var; remove the
iuCoreDirectusCollectionline; rebuild. The factory artifact is additive-only.