chore: 导入旧记忆备份供恢复
This commit is contained in:
+94
@@ -0,0 +1,94 @@
|
||||
---
|
||||
title: Metrix Current State – Issues, Experiences, and Open Items
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/metrix-current-state-issues-experiences-and-open-items
|
||||
stable_id: c5330f56-f9c7-447e-9dc9-dc46b101727e
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: current_state
|
||||
revision: 8
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions:
|
||||
memory:0f19c98d-0d69-4702-af18-e75edae6370a: '1'
|
||||
memory:df065dbf-85de-4f2b-bbb1-5d8b115de08c: '1'
|
||||
memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165: '1'
|
||||
memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b: '1'
|
||||
memory:2bff13bb-b5cc-40fd-8b2f-774f5c6b9dba: '1'
|
||||
memory:6e63a053-fea4-4785-984c-b61fab08810a: '1'
|
||||
memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e: '1'
|
||||
memory:bc21af00-1127-44f8-93b7-aa484a7041c2: '1'
|
||||
memory:a3896ad9-d30c-4963-9232-a7d1ab571d19: '2'
|
||||
memory:5924806e-b234-49f7-b971-3c844fd07cf3: '3'
|
||||
memory:c2d14968-79de-4bbd-ab96-a7a11facd25a: '1'
|
||||
memory:71de6e16-d7bc-4279-84b4-e194e25a086f: '1'
|
||||
memory:fb67062d-89fa-4f26-9ade-e620693277d8: '1'
|
||||
memory:2f6aa721-7bfa-4d49-9036-58bc37a262d5: '1'
|
||||
memory:6d022bb5-053d-45b0-b091-0ca110358827: '1'
|
||||
memory:2a61dd7b-d069-45b0-9fc7-147b9259eedb: '1'
|
||||
memory:9177ce22-0e95-4443-b366-a1833d547e49: '1'
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- curated_baseline:c5330f56-f9c7-447e-9dc9-dc46b101727e
|
||||
- memory:2a61dd7b-d069-45b0-9fc7-147b9259eedb
|
||||
- memory:9177ce22-0e95-4443-b366-a1833d547e49
|
||||
- memory:fb67062d-89fa-4f26-9ade-e620693277d8
|
||||
- memory:2f6aa721-7bfa-4d49-9036-58bc37a262d5
|
||||
- memory:6d022bb5-053d-45b0-b091-0ca110358827
|
||||
- memory:c2d14968-79de-4bbd-ab96-a7a11facd25a
|
||||
- memory:71de6e16-d7bc-4279-84b4-e194e25a086f
|
||||
- global_guidance_memory:bf88c265-4749-4c50-85bc-4bae25298cd5
|
||||
- global_guidance_memory:105b328f-4bda-4641-90a7-7282ef156316
|
||||
- memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e
|
||||
- memory:bc21af00-1127-44f8-93b7-aa484a7041c2
|
||||
- memory:a3896ad9-d30c-4963-9232-a7d1ab571d19
|
||||
- memory:5924806e-b234-49f7-b971-3c844fd07cf3
|
||||
- memory:0f19c98d-0d69-4702-af18-e75edae6370a
|
||||
- memory:df065dbf-85de-4f2b-bbb1-5d8b115de08c
|
||||
- memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165
|
||||
- memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b
|
||||
- memory:2bff13bb-b5cc-40fd-8b2f-774f5c6b9dba
|
||||
- memory:6e63a053-fea4-4785-984c-b61fab08810a
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-12T18:02:53.638428+00:00'
|
||||
updated_at: '2026-08-26T18:37:17.781577+00:00'
|
||||
tags:
|
||||
- Metrix
|
||||
- development
|
||||
- current_state
|
||||
---
|
||||
|
||||
## Current State (as of 2026‑08‑26)
|
||||
|
||||
| Area | Status |
|
||||
|------|--------|
|
||||
| **Backend** | FastAPI fully running; all core modules (`containers`, `database`, `scripts`, `storage`, internal PyPI) registered via `APP_MODULE`. Action‑based RBAC active; Vaultwarden used for credential lookup. |
|
||||
| **Frontend** | Vue 3 SPA stable, Chinese/English toggle, dark/light theme sync (Shiki pending). New **DatabasePanel** supports keyword search (`POST /api/database/table/query`) with pagination & filter persistence. |
|
||||
| **Deployment** | Second instance `capacityrepost‑web:113ff5c` live; health‑check (`/health`) returns 200; image SHA‑256 matches source tar. |
|
||||
| **Validation** | Sample `sector` table: `CGI 122112` → 10 rows, `鹤山` → 8510 rows – pagination & clear/reset work. UI responsive at 1440 px & 720 px (no overlap). Online search returns 8 rows (data drift). |
|
||||
| **Conclusion** | System **stable**; open high‑priority items: **Shiki theme synchronization** and **API‑Token fine‑grained permissions**. |
|
||||
|
||||
All information taken from source `curated_baseline:c5330f56‑f9c7‑447e‑9dc9‑dc46b101727e`.
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: Metrix Development – Pending Tasks & Action Items (development workspace)
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/metrix-development-pending-tasks-action-items-development-workspace
|
||||
stable_id: 4f9233e4-3180-4133-ae70-faff5e7c58c7
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: tasks
|
||||
revision: 9
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions:
|
||||
memory:cf3e85fe-dcf3-4af3-9a17-edfe63b2f56c: '1'
|
||||
memory:2f6aa721-7bfa-4d49-9036-58bc37a262d5: '1'
|
||||
memory:fb67062d-89fa-4f26-9ade-e620693277d8: '1'
|
||||
memory:6d022bb5-053d-45b0-b091-0ca110358827: '1'
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- curated_baseline:4f9233e4-3180-4133-ae70-faff5e7c58c7
|
||||
- memory:2f6aa721-7bfa-4d49-9036-58bc37a262d5
|
||||
- memory:fb67062d-89fa-4f26-9ade-e620693277d8
|
||||
- memory:6d022bb5-053d-45b0-b091-0ca110358827
|
||||
- curated_baseline:c5330f56-f9c7-447e-9dc9-dc46b101727e
|
||||
- curated_baseline:1e1b9a7e-5897-4c82-b267-279a8c54b150
|
||||
- memory:cf3e85fe-dcf3-4af3-9a17-edfe63b2f56c
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-12T18:02:57.939889+00:00'
|
||||
updated_at: '2026-08-26T18:37:34.206312+00:00'
|
||||
tags:
|
||||
- tasks
|
||||
- development
|
||||
---
|
||||
|
||||
## Development Workspace Task List (as of 2026‑08‑26)
|
||||
|
||||
| Task ID | Description | Current Status |
|
||||
|--------|--------------|----------------|
|
||||
| **T‑001** | Add missing MySQL index for 5 M‑row text column (`UPDATE JOIN`) | *未完成* |
|
||||
| **T‑002** | Convert FastAPI `/health` async handler to `def` | ✅ Completed |
|
||||
| **T‑003** | Remove Docker `exec` default 3 s timeout | ✅ Completed |
|
||||
| **T‑004** | Stabilise container‑host network access (`host.docker.internal`/bridge) | *待补充来源* |
|
||||
| **T‑005** | Implement fine‑grained API‑Token permissions (e.g., `container:start`) | *待补充来源* |
|
||||
| **T‑006** | Add MySQL `FULLTEXT` indexes for audit logs & UI toggle | *待补充来源* |
|
||||
| **T‑007** | Build cron‑editor component for `InterferenceETL.schedule` | ✅ Done (`memory:6d022bb5‑053d‑45b0‑b091‑0ca110358827`) |
|
||||
| **T‑008** | CI/CD pipeline for CapacityReport (tests + Docker build) | *待补充来源* |
|
||||
| **T‑009** | Sync Shiki theme with UI dark/light switch | ✅ Done (`memory:fb67062d‑89fa‑4f26‑9ade‑e620693277d8`) |
|
||||
| **T‑010** | Auto‑evict internal PyPI cache (size/TTL) | *待补充来源* |
|
||||
| **T‑011** | Fix Windows terminal copy‑paste failure on named pipes | *待补充来源* |
|
||||
| **T‑012** | Persist table column widths via user‑preferences API | *待补充来源* |
|
||||
| **T‑013** | Configurable duplicate CGI merge strategy | *待补充来源* |
|
||||
| **T‑014** | Add missing `api_enabled` config flag to `core/config.py` | *待补充来源* |
|
||||
| **T‑015** | Replace hard‑coded credentials in `pypi_mirror.py` with env/Vaultwarden | *待补充来源* |
|
||||
|
||||
All completed tasks were verified at the **2026‑08‑26 checkpoint** (`memory:2a61dd7b‑d069‑...`).
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
---
|
||||
title: Metrix Key Architectural Decisions
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/metrix-key-architectural-decisions
|
||||
stable_id: 783ddcc0-2e2e-4731-906a-e67cabc552a5
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: decisions
|
||||
revision: 5
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions:
|
||||
memory:e71d9113-be70-4792-8a7d-81df157ea9a0: '1'
|
||||
memory:52d53ae2-ce5b-4207-9813-0c9d3de029ce: '1'
|
||||
memory:761650df-f1df-4e5a-b23a-adf2d01d5c9f: '1'
|
||||
memory:34271d12-a706-491b-a06b-f561e81f7346: '1'
|
||||
memory:cf3e85fe-dcf3-4af3-9a17-edfe63b2f56c: '1'
|
||||
memory:5924806e-b234-49f7-b971-3c844fd07cf3: '3'
|
||||
memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e: '1'
|
||||
memory:bc21af00-1127-44f8-93b7-aa484a7041c2: '1'
|
||||
memory:a3896ad9-d30c-4963-9232-a7d1ab571d19: '2'
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- curated_baseline:783ddcc0-2e2e-4731-906a-e67cabc552a5
|
||||
- memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e
|
||||
- memory:bc21af00-1127-44f8-93b7-aa484a7041c2
|
||||
- memory:a3896ad9-d30c-4963-9232-a7d1ab571d19
|
||||
- memory:5924806e-b234-49f7-b971-3c844fd07cf3
|
||||
- git:packaging/README.md
|
||||
- git:packaging/pypiserver/Dockerfile
|
||||
- memory:cf3e85fe-dcf3-4af3-9a17-edfe63b2f56c
|
||||
- memory:e71d9113-be70-4792-8a7d-81df157ea9a0
|
||||
- memory:52d53ae2-ce5b-4207-9813-0c9d3de029ce
|
||||
- memory:761650df-f1df-4e5a-b23a-adf2d01d5c9f
|
||||
- memory:34271d12-a706-491b-a06b-f561e81f7346
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-12T18:02:51.479473+00:00'
|
||||
updated_at: '2026-08-26T18:37:20.787207+00:00'
|
||||
tags:
|
||||
- Metrix
|
||||
- development
|
||||
- decisions
|
||||
---
|
||||
|
||||
## Key Decisions (as recorded)
|
||||
|
||||
| Decision ID | Summary | Rationale | Status |
|
||||
|------------|----------|-----------|--------|
|
||||
| `e71d9113‑be70‑4792‑8a7d‑81df157ea9a0` | Keep **CapacityReport** as independent sub‑module + Docker image | Isolated UI & historic data handling | Implemented, runs separately |
|
||||
| `52d53ae2‑ce5b‑4207‑9813‑0c9d3de029ce` | Switch editor highlighting to **Shiki** | Monaco mis‑highlights multiline f‑strings | Integrated (theme sync pending) |
|
||||
| `761650df‑f1df‑4e5a‑b23a‑adf2d01d5c9f` | Adopt **action‑based permission model** | Simplify checks, avoid page rule duplication | All modules migrated |
|
||||
| `34271d12‑a706‑491b‑a06b‑f561e81f7346` | Consolidate script‑run retention to `{max_count, max_days}` | Remove overlapping policies | Unified |
|
||||
| `cf3e85fe‑dcf3‑4af3‑9a17‑edfe63b2f56c` | Freeze local `docs/project_context.md`; **MemRelay only** stores memory | Avoid bidirectional sync, per user request | File read‑only, MemRelay source of truth |
|
||||
| `5924806e‑b234‑49f7‑b971‑3c844fd07cf3` | Formalise **workflow**: Chinese‑first, KISS/YAGNI, ordered steps (implement→clean→memory→docs→commit) | Standardise practice | Documented, tooling enforced |
|
||||
| *Docker‑socket mount* | Mount host Docker socket into `metrix‑app` | Enables host‑level container management for scripts | Documented, admin‑only |
|
||||
| *Offline bundle* | Tarred images + compose files for air‑gapped deployment | Offline environments cannot pull from Docker Hub | `scripts/build_docker.py` creates bundle |
|
||||
| *Internal PyPI server* | Run `pypiserver` container, serve wheels offline | Remove external PyPI dependency | Implemented, UI `/pypi` added |
|
||||
| *Windows directory‑rename lock* | Work‑around: move locked objects, rename, move back, `git submodule sync` | IDE lock on `.git` prevented rename | Fixed (see troubleshooting) |
|
||||
| *Sub‑module locations* | **CapacityReport** & **InterferenceETL** moved under `plugins/` with independent Docker images | Clear structure, isolated versioning | Completed (2026‑08‑17) |
|
||||
|
||||
Source: `curated_baseline:783ddcc0‑2e2e‑4731‑906a‑e67cabc552a5`.
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
---
|
||||
title: Metrix Project Chronology (June – August 2026)
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/metrix-project-chronology-june-august-2026
|
||||
stable_id: adabe7ac-b8ac-48f6-9d1d-7b1fc95045f9
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: timeline
|
||||
revision: 9
|
||||
source_memory_ids:
|
||||
- e53bcaef-4e7c-4bd7-b480-783f864c5a1f
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: null
|
||||
source_git_commits: []
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 23
|
||||
source_revisions:
|
||||
memory:78fb5c39-9868-4a50-aaaa-922593949906: '1'
|
||||
memory:a12aba0c-cc4a-4336-a31d-5c9cb239f195: '1'
|
||||
memory:0f19c98d-0d69-4702-af18-e75edae6370a: '1'
|
||||
memory:e71d9113-be70-4792-8a7d-81df157ea9a0: '1'
|
||||
memory:52d53ae2-ce5b-4207-9813-0c9d3de029ce: '1'
|
||||
memory:761650df-f1df-4e5a-b23a-adf2d01d5c9f: '1'
|
||||
memory:34271d12-a706-491b-a06b-f561e81f7346: '1'
|
||||
memory:669e2c30-1109-4f5f-962c-93460d1b1328: '1'
|
||||
memory:02240540-80f2-47ed-badf-30a9132c0336: '1'
|
||||
memory:673b121e-1adf-4613-91db-cf6ce550826c: '1'
|
||||
memory:a3896ad9-d30c-4963-9232-a7d1ab571d19: '2'
|
||||
memory:77949bba-f7b8-4fc0-859d-70f415614148: '1'
|
||||
memory:71c1d6e8-7c2a-4d51-bf6d-3080ee24a441: '1'
|
||||
memory:4834e28b-9c36-419a-8ff8-f8c1963bfd39: '1'
|
||||
memory:535e8ec7-603d-4514-8ead-529613374619: '1'
|
||||
memory:3e6dcfc1-f561-415d-9356-b387347c9193: '1'
|
||||
memory:0ca7e07e-97b7-496c-96c8-dc712498fc8e: '1'
|
||||
memory:5924806e-b234-49f7-b971-3c844fd07cf3: '3'
|
||||
memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2: '1'
|
||||
memory:cf3e85fe-dcf3-4af3-9a17-edfe63b2f56c: '1'
|
||||
memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e: '1'
|
||||
memory:bc21af00-1127-44f8-93b7-aa484a7041c2: '1'
|
||||
memory:a0d04ea2-c8d7-4fe2-b381-4288b6cb1a63: '1'
|
||||
memory:c2d14968-79de-4bbd-ab96-a7a11facd25a: '1'
|
||||
memory:71de6e16-d7bc-4279-84b4-e194e25a086f: '1'
|
||||
memory:2f6aa721-7bfa-4d49-9036-58bc37a262d5: '1'
|
||||
memory:fb67062d-89fa-4f26-9ade-e620693277d8: '1'
|
||||
memory:6d022bb5-053d-45b0-b091-0ca110358827: '1'
|
||||
memory:2a61dd7b-d069-45b0-9fc7-147b9259eedb: '1'
|
||||
memory:4bb466b0-bd09-4a6b-9280-559cc0b2bba2: '1'
|
||||
memory:e53bcaef-4e7c-4bd7-b480-783f864c5a1f: '1'
|
||||
source_dispositions:
|
||||
processed: 23
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- curated_baseline:adabe7ac-b8ac-48f6-9d1d-7b1fc95045f9
|
||||
- memory:e53bcaef-4e7c-4bd7-b480-783f864c5a1f
|
||||
- memory:2a61dd7b-d069-45b0-9fc7-147b9259eedb
|
||||
- memory:4bb466b0-bd09-4a6b-9280-559cc0b2bba2
|
||||
- memory:2f6aa721-7bfa-4d49-9036-58bc37a262d5
|
||||
- memory:fb67062d-89fa-4f26-9ade-e620693277d8
|
||||
- memory:6d022bb5-053d-45b0-b091-0ca110358827
|
||||
- memory:a0d04ea2-c8d7-4fe2-b381-4288b6cb1a63
|
||||
- global_guidance_document:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||||
- memory:c2d14968-79de-4bbd-ab96-a7a11facd25a
|
||||
- memory:71de6e16-d7bc-4279-84b4-e194e25a086f
|
||||
- curated_baseline:c5330f56-f9c7-447e-9dc9-dc46b101727e
|
||||
- memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e
|
||||
- memory:bc21af00-1127-44f8-93b7-aa484a7041c2
|
||||
- memory:a3896ad9-d30c-4963-9232-a7d1ab571d19
|
||||
- memory:5924806e-b234-49f7-b971-3c844fd07cf3
|
||||
- git:docs/project_context.md
|
||||
- git:web/index.html
|
||||
- git:web/package-lock.json
|
||||
- git:web/package.json
|
||||
- git:web/playwright.config.ts
|
||||
- git:web/scripts/smoke.mjs
|
||||
- git:web/src/api/client.ts
|
||||
- git:web/src/config/permissions.ts
|
||||
- git:packaging/README.md
|
||||
- git:packaging/pypiserver/Dockerfile
|
||||
- memory:cf3e85fe-dcf3-4af3-9a17-edfe63b2f56c
|
||||
- memory:78fb5c39-9868-4a50-aaaa-922593949906
|
||||
- memory:a12aba0c-cc4a-4336-a31d-5c9cb239f195
|
||||
- memory:0f19c98d-0d69-4702-af18-e75edae6370a
|
||||
- memory:e71d9113-be70-4792-8a7d-81df157ea9a0
|
||||
- memory:52d53ae2-ce5b-4207-9813-0c9d3de029ce
|
||||
- memory:761650df-f1df-4e5a-b23a-adf2d01d5c9f
|
||||
- memory:34271d12-a706-491b-a06b-f561e81f7346
|
||||
- memory:669e2c30-1109-4f5f-962c-93460d1b1328
|
||||
- memory:02240540-80f2-47ed-badf-30a9132c0336
|
||||
- memory:673b121e-1adf-4613-91db-cf6ce550826c
|
||||
- memory:77949bba-f7b8-4fc0-859d-70f415614148
|
||||
- memory:71c1d6e8-7c2a-4d51-bf6d-3080ee24a441
|
||||
- memory:4834e28b-9c36-419a-8ff8-f8c1963bfd39
|
||||
- memory:535e8ec7-603d-4514-8ead-529613374619
|
||||
- memory:3e6dcfc1-f561-415d-9356-b387347c9193
|
||||
- memory:0ca7e07e-97b7-496c-96c8-dc712498fc8e
|
||||
- memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2
|
||||
job_cited_source_ids:
|
||||
- curated_baseline:adabe7ac-b8ac-48f6-9d1d-7b1fc95045f9
|
||||
- memory:e53bcaef-4e7c-4bd7-b480-783f864c5a1f
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 206
|
||||
source_hash: 7280e3381d919e633bdfb3d937f6834adec8584cf5243460bd57164813c0704e
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: b4be6951-aedc-4a1e-8344-36b71231f95a
|
||||
created_at: '2026-08-12T18:02:55.672053+00:00'
|
||||
updated_at: '2026-08-28T10:11:30.934703+00:00'
|
||||
tags:
|
||||
- Metrix
|
||||
- development
|
||||
- timeline
|
||||
---
|
||||
|
||||
## Timeline (selected milestones)
|
||||
|
||||
| Date (UTC) | Event | Source |
|
||||
|------------|-------|--------|
|
||||
| **2026-08-26 08:29:43** | Completed CapacityReport field‑search, deployed second instance `capacityrepost‑web:113ff5c`. | `memory:2a61dd7b-d069-45b0-9fc7-147b9259eedb` |
|
||||
| **2026-08-26 08:38:52** | Confirmed health endpoint OK, real data search returned expected rows. | `memory:fb67062d-89fa-4f26-9ade-e620693277d8` |
|
||||
| **2026-08-26 08:38:52** | Recorded implementation details of search UI (POST `/api/database/table/query`). | `memory:6d022bb5-053d-45b0-b091-0ca110358827` |
|
||||
| **2026-08-26 09:20:49** | Finished sector inference & CGI import fix (unique index, de‑dup logic). | `memory:2a61dd7b-d069-45b0-9fc7-147b9259eedb` |
|
||||
| **2026-08-26 09:21:46** | Sector fix deployed, data cleaned, unique index active. | `memory:4bb466b0-bd09-...` |
|
||||
| **2026-08-17** | Migration of **CapacityReport** & **InterferenceETL** into `plugins/`. | `memory:6c4cbc6d-a59b-...` |
|
||||
| **2026-08-26** | Validation checkpoint confirmed all completed tasks. | `memory:bc21af00-1127-44f8-93b7-aa484a7041c2` |
|
||||
| **2026-08-26** | Verified that pending AI‑generated todo items are checked before work starts. | `memory:e53bcaef-4e7c-4bd7-b480-783f864c5a1f` |
|
||||
| **2026-08-26** | Added cron‑editor component for InterferenceETL schedule UI. | `memory:a3896ad9-d30c-...` |
|
||||
|
||||
*All events are extracted from the respective memory checkpoints and the timeline baseline.*
|
||||
+314
File diff suppressed because one or more lines are too long
+63
@@ -0,0 +1,63 @@
|
||||
---
|
||||
title: Metrix Project – Glossary of Key Terms
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/metrix-project-glossary-of-key-terms
|
||||
stable_id: 6c3351ae-506f-4059-a23d-6937503b9b73
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: glossary
|
||||
revision: 2
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions: {}
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- git:server/app/core/permissions.py
|
||||
- git:server/app/core/security.py
|
||||
- git:server/app/main.py
|
||||
- git:packaging/README.md
|
||||
- git:packaging/pypiserver/Dockerfile
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-19T02:32:21.717909+00:00'
|
||||
updated_at: '2026-08-26T18:37:38.755195+00:00'
|
||||
tags:
|
||||
- glossary
|
||||
- terms
|
||||
---
|
||||
|
||||
## Glossary (derived from architecture and decisions)
|
||||
|
||||
- **API Gateway / FastAPI Core** – The entry point of the backend, implemented in `git:server/app/main.py`. Provides OpenAPI spec, CORS handling and SPA fallback.
|
||||
- **APP_MODULE** – Objects discovered by the Module Registry (`modules/registry.py`) that register routes, permissions and UI pages.
|
||||
- **Action‑based RBAC** – Permission model where actions (e.g., `container:start`) are granted; navigation is inferred from any granted action (`action:* → read`).
|
||||
- **Shiki** – High‑performance syntax highlighter used in the editor; theme synchronization with UI dark/light mode is a pending task.
|
||||
- **Vaultwarden** – Self‑hosted password manager consulted for all credential look‑ups before any external connection.
|
||||
- **KISS / YAGNI** – Development principles mandated for the project (keep it simple, you aren’t gonna need it).
|
||||
- **CAPACITYREPORT** – Independent sub‑module delivering reporting UI; runs in its own Docker image and database.
|
||||
- **INTERFERENCEETL** – ETL sub‑module that performs neighbour‑cell interference analysis; includes schedule cron‑editor.
|
||||
- **PYPI SERVER** – Internal `pypiserver` container used to host offline Python wheels.
|
||||
- **Cron‑editor** – UI component that allows visual editing of cron expressions for scheduled jobs.
|
||||
- **FULLTEXT Index** – MySQL index type enabling keyword search in audit logs (high‑priority open work).
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
---
|
||||
title: Metrix Maintenance & Open Issues (Shared Workspace)
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/development/metrix-maintenance-open-issues-shared-workspace
|
||||
stable_id: 13ffa178-e9cf-4735-8da4-e1d4cf683a52
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: maintenance
|
||||
revision: 2
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions:
|
||||
memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e: '1'
|
||||
memory:a3896ad9-d30c-4963-9232-a7d1ab571d19: '2'
|
||||
memory:bc21af00-1127-44f8-93b7-aa484a7041c2: '1'
|
||||
memory:5924806e-b234-49f7-b971-3c844fd07cf3: '3'
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e
|
||||
- memory:a3896ad9-d30c-4963-9232-a7d1ab571d19
|
||||
- memory:bc21af00-1127-44f8-93b7-aa484a7041c2
|
||||
- memory:5924806e-b234-49f7-b971-3c844fd07cf3
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-19T02:32:37.159033+00:00'
|
||||
updated_at: '2026-08-26T18:37:50.102629+00:00'
|
||||
tags:
|
||||
- maintenance
|
||||
- troubleshooting
|
||||
- tasks
|
||||
- preferences
|
||||
- sql
|
||||
- docker
|
||||
---
|
||||
|
||||
## High‑Priority Open Work Items (as of 2026‑08‑26)
|
||||
|
||||
| ID | Description | Root Cause | Source |
|
||||
|----|-------------|------------|--------|
|
||||
| **SQL‑Index‑Missing** | Add missing index for large `UPDATE JOIN` on ~5 M‑row text column (query > 2 h) | C‑05 (large query) | `memory:6c4cbc6d‑a59b‑...` |
|
||||
| **FastAPI `/health` Freeze** | Convert async blocking handler to regular `def` | C‑03 | `memory:6c4cbc6d‑a59b‑...` |
|
||||
| **Docker Exec Timeout** | Remove default 3 s socket timeout that disconnects terminals | C‑04 | `memory:6c4cbc6d‑a59b‑...` |
|
||||
| **Container‑Host Networking** | Ensure containers reliably reach host services | Identified need | – |
|
||||
| **API‑Token Permission Granularity** | Extend token model for fine‑grained actions (`container:start`) | Current policy blocks mutating ops | – |
|
||||
| **Full‑Text Audit‑Log Search** | Add MySQL `FULLTEXT` indexes & UI toggle | Keyword‑only search today | – |
|
||||
| **InterferenceETL Schedule UI** | Visual cron‑editor for `schedule` field | Text‑only schedule currently | `memory:a3896ad9‑d30c‑...` |
|
||||
| **CapacityReport CI/CD** | Automate tests & Docker image builds per release | Manual sync currently | – |
|
||||
| **Shiki Theme Sync** | Keep Shiki highlighting in sync with UI dark/light theme | Pending implementation | – |
|
||||
| **Internal PyPI Cache Eviction** | Background job to purge old wheels when size/TTL limits hit | No eviction policy | – |
|
||||
| **Terminal Copy‑Paste on Windows** | Add error handling & UI notification for pipe failures | Sporadic failures observed | – |
|
||||
| **Column‑Width Persistence** | Store layout metadata via user‑preferences API (instead of only `localStorage`) | Current per‑page only | – |
|
||||
| **Duplicate‑CGI Merge Strategy** | Configurable (`highest|latest|average`) merge for duplicate rows | Fixed to “highest DBM” | – |
|
||||
|
||||
## Resolved Tasks (Verified at 2026‑08‑26 checkpoint)
|
||||
|
||||
- **FastAPI `/health` async → def conversion** – ✅ (`memory:fb67062d‑89fa‑...`).
|
||||
- **Docker exec timeout removal** – ✅ (`memory:6c4cbc6d‑a59b‑...`).
|
||||
- **Shiki theme sync implementation** – ✅ (`memory:fb67062d‑89fa‑...`).
|
||||
- **InterferenceETL cron‑editor UI** – ✅ (`memory:6d022bb5‑053d‑...`).
|
||||
- **CapacityReport second instance deployment** – ✅ (`memory:2a61dd7b‑d069‑...`).
|
||||
|
||||
## Troubleshooting Summary
|
||||
|
||||
| # | Symptom | Cause | Solution |
|
||||
|---|---------|-------|----------|
|
||||
| 1 | Windows directory rename locked | IDE holds handle on `.git` | Stop IDE, rename, `git submodule sync` |
|
||||
| 2 | `/health` endpoint never returns | Async handler performed blocking I/O | Convert to regular `def` |
|
||||
| 3 | Docker `exec` sessions disconnect after ~3 s | Default socket timeout | Call `socket.settimeout(None)` after `exec_start` |
|
||||
| 4 | Missing `api_enabled` flag → `forbidden` error | Config lacks flag | Add `api_enabled: bool = True` in `core/config.py` |
|
||||
| 5 | Hard‑coded credentials in `pypi_mirror.py` | Placeholder left in code | Use env vars or Vaultwarden |
|
||||
| 6 | `create-module.mjs` typo (`___SNAKE___snapshot`) | Template typo | Fix placeholder |
|
||||
| 7 | Empty `pytest.ini` | No test files | Add tests or update config |
|
||||
| 8 | Generic `except Exception: pass` in container exec WS | Swallows errors | Log exception & close WebSocket |
|
||||
| 9 | Permission expansion not applied (`resource:*` → read) | Expansion logic missing | Ensure `expand_permissions` runs during seeding |
|
||||
|10| Shiki theme not syncing on UI theme change | Shiki instance not updated | Watch `appStore.dark`, call `shiki.setTheme` |
|
||||
|11| Terminal copy‑paste fails on Windows named pipes | Missing error handling | Add UI toast & fallback to TCP |
|
||||
|12| Column‑width reset on reload | Width stored only in `localStorage` | Persist via `/api/user/preferences` |
|
||||
|13| Duplicate CGI merge strategy undefined | No config option | Add `duplicate_cgi_merge` setting |
|
||||
|14| Internal PyPI cache grows unbounded | No eviction policy | Background job to delete oldest wheels when limits exceeded |
|
||||
|
||||
## Ongoing Development Preferences (scenario level)
|
||||
|
||||
1. **Workflow Order** – Implement → Clean → Memory → Docs → Commit (Chinese‑first, KISS/YAGNI). (source: `global_guidance_memory:5924806e-...`, `global_guidance_document:e4fc35f2-...`)
|
||||
2. **Git Commit Convention** – `type: 中文一句话描述` (e.g., `feat: 添加用户登录`). (source: `global_guidance_document:d3a20d44-...`)
|
||||
3. **Environment** – Development on Windows + WSL2 + Docker Desktop; all commands must be Windows‑compatible. (source: `global_guidance_document:6973450e-...`, `global_guidance_document:8a861a5f-...`)
|
||||
|
||||
These preferences are recorded at the **scenario** level for the *development* workspace and do not create global settings.
|
||||
|
||||
## Tags
|
||||
|
||||
`[maintenance]` `[troubleshooting]` `[tasks]` `[preferences]` `[sql]` `[docker]`
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
---
|
||||
title: Metrix Offline Deployment & Sub‑module Migration Guide
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/development/metrix-offline-deployment-sub-module-migration-guide
|
||||
stable_id: bb1539bd-c7f2-4d57-9257-8e4b2b4672cb
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: deployment
|
||||
revision: 2
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions:
|
||||
memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e: '1'
|
||||
memory:a3896ad9-d30c-4963-9232-a7d1ab571d19: '2'
|
||||
memory:bc21af00-1127-44f8-93b7-aa484a7041c2: '1'
|
||||
memory:5924806e-b234-49f7-b971-3c844fd07cf3: '3'
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- memory:6c4cbc6d-a59b-4128-9d6a-cb9652cff00e
|
||||
- memory:a3896ad9-d30c-4963-9232-a7d1ab571d19
|
||||
- memory:bc21af00-1127-44f8-93b7-aa484a7041c2
|
||||
- memory:5924806e-b234-49f7-b971-3c844fd07cf3
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-19T02:32:32.719008+00:00'
|
||||
updated_at: '2026-08-26T18:37:45.656797+00:00'
|
||||
tags:
|
||||
- deployment
|
||||
- docker
|
||||
- fastapi
|
||||
- vue
|
||||
- ci
|
||||
- offline
|
||||
- security
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The **Metrix** platform is a modular FastAPI + Vue 3 system deployed via Docker. The architecture consists of an API gateway, core modules (containers, database, scripts, storage, internal PyPI), and a SPA front‑end built with Vite and Naïve‑UI. All modules are auto‑registered through `APP_MODULE` and use an action‑based RBAC model.
|
||||
|
||||
| Layer | Component | Key notes |
|
||||
|------|-----------|-----------|
|
||||
| API Gateway / FastAPI Core | `git:server/app/main.py` | FastAPI factory, OpenAPI, CORS, SPA fallback |
|
||||
| Module Registry | `git:server/app/modules/registry.py` | Discovers `APP_MODULE` objects, validates keys & deps |
|
||||
| Permission Framework | `git:server/app/core/permissions.py` | Action‑based RBAC; `action:* → read` |
|
||||
| Security Utils | `git:server/app/core/security.py` | PBKDF2‑SHA256 hashing, `mtx_` API‑tokens, Fernet secrets |
|
||||
| Database Sub‑system | ORM models, `git:server/app/db/init.py`, migrations | SQLAlchemy sessions, alembic‑style registry |
|
||||
| Containers Module | Docker client, WS xterm.js terminal | `modules/containers/...` |
|
||||
| Storage API | FTP/SFTP adapters, file‑tree service (depth/size caps) |
|
||||
| Offline Docker Deployment | `scripts/build_docker.py` → `metrix‑app‑latest.tar` (+ optional MySQL & internal PyPI) |
|
||||
| Front‑End SPA | Vue 3 + TypeScript + Vite + Naïve‑UI; i18n (EN/ZH), dark/light themes, Monaco + Shiki, Playwright tests |
|
||||
| CI / Regression | Playwright end‑to‑end suite (`tests/regression/framework.spec.ts`) |
|
||||
|
||||
## Current Deployment State (as of 2026‑08‑26)
|
||||
|
||||
- **Backend**: FastAPI fully running; all core modules (`containers`, `database`, `scripts`, `storage`, internal PyPI) registered via `APP_MODULE`. Action‑based RBAC active; Vaultwarden is the source of credentials (`global_guidance_memory:105b328f‑…`).
|
||||
- **Frontend**: Vue 3 SPA stable, English/Chinese toggle, dark/light theme sync (Shiki pending). The new **DatabasePanel** supports keyword search (`POST /api/database/table/query`) with pagination and filter persistence.
|
||||
- **Instances**: A second instance `capacityrepost‑web:113ff5c` is live; health‑check (`/health`) returns **200** and the image SHA‑256 matches the offline bundle.
|
||||
- **Validation**: Example `sector` table queries return expected row counts; UI renders correctly at both 1440 px and 720 px widths.
|
||||
- **Conclusion**: The system is **stable**; only high‑priority open items remain (Shiki theme sync, fine‑grained API‑token permissions).
|
||||
|
||||
## Deployment Artifacts
|
||||
|
||||
- **Docker images** are built with `scripts/build_docker.py`, producing `metrix‑app‑latest.tar`. The tar contains the FastAPI image, the Vue SPA static assets, and an optional MySQL image for air‑gapped environments.
|
||||
- **Compose files** define the primary service (`metrix‑app`) and the secondary `capacityrepost‑web` with its own MySQL container.
|
||||
- **Internal PyPI server** (`pypiserver` container) provides offline wheels; the UI is exposed at `/pypi`.
|
||||
- **Offline bundle** supports deployments without Internet access.
|
||||
|
||||
## Key Deployment Decisions
|
||||
|
||||
| Decision ID | Summary | Rationale | Status |
|
||||
|------------|----------|-----------|--------|
|
||||
| `e71d9113‑be70‑4792‑8a7d‑81df157ea9a0` | Keep **CapacityReport** as independent sub‑module + Docker image | Isolated UI & historic data handling | Implemented |
|
||||
| `52d53ae2‑ce5b‑4207‑9813‑0c9d3de029ce` | Switch editor highlighting to **Shiki** | Monaco mis‑highlights multiline f‑strings | Integrated (theme sync pending) |
|
||||
| `761650df‑f1df‑4e5a‑b23a‑adf2d01d5c9f` | Adopt **action‑based permission model** | Simplify checks, avoid page rule duplication | All modules migrated |
|
||||
| `34271d12‑a706‑491b‑a06b‑f561e81f7346` | Consolidate script‑run retention to `{max_count, max_days}` | Remove overlapping policies | Unified |
|
||||
| `cf3e85fe‑dcf3‑4af3‑9a17‑edfe63b2f56c` | Freeze local `docs/project_context.md`; **MemRelay only** stores memory | Avoid bidirectional sync, per user request | File read‑only, MemRelay source of truth |
|
||||
| `5924806e‑b234‑49f7‑b971‑3c844fd07cf3` | Formalise **workflow**: Chinese‑first, KISS/YAGNI, ordered steps (implement→clean→memory→docs→commit) | Standardise practice | Documented, tooling enforced |
|
||||
| *Docker‑socket mount* | Mount host Docker socket into `metrix‑app` | Enables host‑level container management for scripts | Documented, admin‑only |
|
||||
| *Offline bundle* | Tarred images + compose files for air‑gapped deployment | Offline environments cannot pull from Docker Hub | `scripts/build_docker.py` creates bundle |
|
||||
| *Internal PyPI server* | Run `pypiserver` container, serve wheels offline | Remove external PyPI dependency | Implemented, UI `/pypi` added |
|
||||
|
||||
## Deployment‑Related Preferences (scenario level, development workspace)
|
||||
|
||||
1. **Language** – Daily communication in **中文** unless otherwise requested. (source: `global_guidance_memory:7429c22e-...`, `global_guidance_document:6973450e-...`)
|
||||
2. **Credential Handling** – All secrets must be fetched from **Vaultwarden**; only the credential name is stored in memory. (source: `global_guidance_memory:105b328f-...`, `global_guidance_document:2b47472d-...`)
|
||||
3. **FastAPI Async Pitfall** – Avoid blocking I/O inside `async def`; move to `def` or thread‑pool. (source: `global_guidance_document:e4fc35f2-...`)
|
||||
4. **Docker Exec Timeout** – Disable default 3 s timeout via `socket.settimeout(None)`. (source: `global_guidance_document:e4fc35f2-...`)
|
||||
5. **KISS & YAGNI** – Keep implementations minimal, no speculative dependencies. (source: `global_guidance_memory:bf88c265-...`, `global_guidance_document:2b47472d-...`)
|
||||
|
||||
These preferences are recorded as **scenario‑level** because the output scope is *project* and cannot promote them to global.
|
||||
|
||||
## Tags
|
||||
|
||||
`[deployment]` `[docker]` `[fastapi]` `[vue]` `[ci]` `[offline]` `[security]`
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
---
|
||||
title: Metrix System Architecture Overview
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/development/metrix-system-architecture-overview
|
||||
stable_id: 44fc1143-7dee-4e0a-8086-42b65f39e0de
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: architecture
|
||||
revision: 2
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions: {}
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- git:server/app/main.py
|
||||
- git:server/app/modules/registry.py
|
||||
- git:server/app/core/permissions.py
|
||||
- git:server/app/core/security.py
|
||||
- git:server/app/db/init.py
|
||||
- git:server/app/migrations/registry.py
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-19T02:32:26.402300+00:00'
|
||||
updated_at: '2026-08-26T18:37:29.455265+00:00'
|
||||
tags:
|
||||
- architecture
|
||||
- fastapi
|
||||
- vue
|
||||
- modules
|
||||
---
|
||||
|
||||
## Architecture Overview (2026‑08‑26)
|
||||
|
||||
| Layer | Component | Key Notes |
|
||||
|------|-----------|-----------|
|
||||
| **API Gateway / FastAPI Core** | `git:server/app/main.py` | FastAPI app factory, OpenAPI, CORS, SPA fallback |
|
||||
| **Module Registry** | `git:server/app/modules/registry.py` | Discovers `APP_MODULE` objects, validates keys & deps |
|
||||
| **Permission Framework** | `git:server/app/core/permissions.py` | Action‑based RBAC; `action:* → read` |
|
||||
| **Security Utils** | `git:server/app/core/security.py` | PBKDF2‑SHA256 hashing, `mtx_` API‑tokens, Fernet secrets |
|
||||
| **Database Sub‑system** | ORM models, `git:server/app/db/init.py`, migrations | SQLAlchemy sessions, alembic‑style registry |
|
||||
| **Containers Module** | Docker client, WS xterm.js terminal | `modules/containers/...` |
|
||||
| **Database Module** | Export/Import, APScheduler jobs, pagination |
|
||||
| **Scripts Execution Platform** | Preset Docker images, quota, retention policies |
|
||||
| **Storage API** | FTP/SFTP adapters, file‑tree service (depth/size caps) |
|
||||
| **Offline Docker Deployment** | `scripts/build_docker.py` → `metrix‑app‑latest.tar` (+ optional MySQL & internal PyPI) |
|
||||
| **Front‑End SPA** | Vue 3 + TypeScript + Vite + Naïve‑UI; i18n (EN/ZH), dark/light themes, Monaco + Shiki, Playwright tests |
|
||||
| **CI / Regression** | Playwright end‑to‑end suite (`tests/regression/framework.spec.ts`) |
|
||||
|
||||
**Module Interaction Flow** – router guard → auth store → API client → registered pages → background job polling.
|
||||
|
||||
The architecture reflects the stable state captured on **2026‑08‑26** (see Current State).
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
---
|
||||
title: Metrix – Common Issues & Resolutions
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/development/metrix-common-issues-resolutions
|
||||
stable_id: 1e1b9a7e-5897-4c82-b267-279a8c54b150
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: troubleshooting
|
||||
revision: 2
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: openai/gpt-oss-120b
|
||||
source_count: 29
|
||||
source_revisions: {}
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids: []
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: 2f4c6153-e0ba-474f-b22b-8e6dc8f0870d
|
||||
created_at: '2026-08-19T02:32:30.066112+00:00'
|
||||
updated_at: '2026-08-26T18:37:41.797298+00:00'
|
||||
tags:
|
||||
- troubleshooting
|
||||
- issues
|
||||
---
|
||||
|
||||
## Troubleshooting Summary (compiled from baseline)
|
||||
|
||||
| # | Symptom | Cause | Solution |
|
||||
|---|---------|-------|----------|
|
||||
| 1 | Windows directory rename locked (`git status` “cannot move”) | IDE holds handle on `.git` | Stop IDE, move `.git` aside, rename, move back, `git submodule sync` |
|
||||
| 2 | `/health` endpoint never returns | Async handler performed blocking I/O | Convert handler to regular `def` (thread‑pool) |
|
||||
| 3 | Docker `exec` sessions disconnect after ~3 s | Default socket timeout | After `exec_start`, call `socket.settimeout(None)` |
|
||||
| 4 | Missing `api_enabled` flag → `forbidden` error | Flag absent in `core/config.py` | Add `api_enabled: bool = True` (configurable) |
|
||||
| 5 | Hard‑coded credentials in `pypi_mirror.py` | Placeholder left in code | Use environment variables or Vaultwarden for secrets |
|
||||
| 6 | `create-module.mjs` typo (`___SNAKE___snapshot`) | Template typo | Fix placeholder to correct name |
|
||||
| 7 | `pytest.ini` points to empty test dir | No tests present | Add test files or update config |
|
||||
| 8 | Generic `except Exception: pass` in container exec WS | Swallows errors | Replace with logged exception + WebSocket close |
|
||||
| 9 | Permission expansion not applied (`resource:* → read`) | Expansion logic missing | Ensure `expand_permissions` runs during seeding |
|
||||
|10| Shiki theme not syncing on UI theme change | Shiki instance not updated | Watch `appStore.dark`, call `shiki.setTheme` |
|
||||
|11| Terminal copy‑paste fails on Windows named pipes | Missing error handling | Add UI toast & fallback to TCP |
|
||||
|12| Column‑width reset on reload | Width stored only in `localStorage` | Persist via `/api/user/preferences` |
|
||||
|13| Duplicate CGI merge strategy undefined | No config option | Add `duplicate_cgi_merge` setting (`highest|latest|average`) |
|
||||
|14| Internal PyPI cache grows unbounded | No eviction policy | Background job to delete oldest wheels when limits exceeded |
|
||||
|15| Re‑reported missing `api_enabled` flag (duplicate) | See #4 | — |
|
||||
|
||||
These solutions have been applied where marked **✅ Completed** in the task list. Remaining items are tracked in the **High‑Priority Open Work Items** table (source `curated_baseline:13ffa178‑e9cf‑4735‑8da4‑e1d4cf683a52`).
|
||||
Reference in New Issue
Block a user