191 lines
8.3 KiB
Markdown
191 lines
8.3 KiB
Markdown
---
|
||
title: Development Context Overview
|
||
type: curated
|
||
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/development-context-overview
|
||
stable_id: d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
scope: global
|
||
project_id: null
|
||
workspace_type: global
|
||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||
preference_context: global
|
||
document_type: context_development
|
||
revision: 1
|
||
source_memory_ids:
|
||
- d8161df6-3159-46c9-9402-c5ab30d1436e
|
||
source_checkpoint_ids: []
|
||
source_file_ids: []
|
||
source_git_commit: null
|
||
source_git_commits: []
|
||
source_agent_sync_ids: []
|
||
model_connection: Sub2API
|
||
model_name: git-restore
|
||
source_count: 90
|
||
source_revisions:
|
||
memory:bf88c265-4749-4c50-85bc-4bae25298cd5: '4'
|
||
memory:5ed86f53-b53e-4534-8e51-d3a010069d5e: '2'
|
||
memory:105b328f-4bda-4641-90a7-7282ef156316: '2'
|
||
memory:3f91189b-11a1-45bb-8357-4f413dc1609d: '1'
|
||
source_dispositions:
|
||
processed: 90
|
||
unchanged: 0
|
||
unsupported: 0
|
||
skipped: 0
|
||
cited_source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
- cross_workspace_memory:dd093dd7-71be-46a2-bcb1-4a87c3d4b9ab
|
||
- cross_workspace_memory:b476b307-7224-4128-8499-4c43a2ad1cb5
|
||
- cross_workspace_memory:67a86e88-a750-4cd8-9650-c1b7cfbf22b9
|
||
- cross_workspace_memory:2939ce96-a6f6-418a-9a70-568980dbdc2a
|
||
- cross_workspace_memory:7737eaaf-441e-476e-aea0-42a4d13ae245
|
||
- cross_workspace_memory:92e5c8d9-c4ef-4ab7-99ac-1b81f3228b59
|
||
- cross_workspace_memory:dc70f54c-8e29-4834-a5c1-a63bc9ac9e68
|
||
- cross_workspace_memory:e1b8d25d-f638-4fbe-8a8d-0eda8f2d7d46
|
||
- cross_workspace_memory:6b129c78-a412-41e9-af9f-63ab071e03d9
|
||
- cross_workspace_memory:df7b18f9-490f-415f-a388-2332d1b7df87
|
||
- cross_workspace_memory:f42fc721-886f-4d6d-85a4-1611d7bc2cf1
|
||
- cross_workspace_memory:a9739d28-4318-492e-bad3-53e9ea2769a8
|
||
- cross_workspace_memory:814d437d-2c21-4f02-b17b-97fd3ec03f7e
|
||
- cross_workspace_memory:650349fe-0a22-4d62-b3ab-329523cb1960
|
||
- cross_workspace_memory:180c6231-32a2-4513-980b-613afff09cbe
|
||
- cross_workspace_memory:f8c5300e-3068-4003-a816-b20f997d9715
|
||
- cross_workspace_memory:4f58f272-ba63-4f40-a617-c35cfa4cad6e
|
||
- cross_workspace_memory:cb5d1924-eb5d-4e63-9696-4033f7d0b943
|
||
- cross_workspace_memory:27678f65-69be-4d2d-84f9-fc4ed515819c
|
||
- cross_workspace_memory:74160f67-38fe-487e-a2d3-8f739c31a09b
|
||
- cross_workspace_memory:84879e0b-c836-496e-a6cd-d607d6445689
|
||
- cross_workspace_memory:2f6e65b2-e6f2-4970-b570-1895590207dd
|
||
- cross_workspace_memory:9d00d45d-e524-4fbd-8b40-bd9b8d89e7f7
|
||
- cross_workspace_memory:97c12ace-42c3-40ad-a7e6-18b5f765bd72
|
||
- cross_workspace_memory:8d83fdf5-683a-41ce-94ed-da186cf32c71
|
||
- cross_workspace_memory:67499b3a-97a6-4982-9c16-4afaa59d45f3
|
||
- cross_workspace_memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2
|
||
- cross_workspace_memory:df065dbf-85de-4f2b-bbb1-5d8b115de08c
|
||
- cross_workspace_memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b
|
||
- cross_workspace_memory:0f19c98d-0d69-4702-af18-e75edae6370a
|
||
- cross_workspace_memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165
|
||
- cross_workspace_memory:6e63a053-fea4-4785-984c-b61fab08810a
|
||
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
|
||
- cross_workspace_memory:61e30ee3-0e26-4d64-b00e-f77bc3a3fd60
|
||
- cross_workspace_memory:2bff13bb-b5cc-40fd-8b2f-774f5c6b9dba
|
||
- cross_workspace_memory:5924806e-b234-49f7-b971-3c844fd07cf3
|
||
- cross_workspace_memory:0ca7e07e-97b7-496c-96c8-dc712498fc8e
|
||
- cross_workspace_memory:09d9ff03-0cbd-4551-9b74-f5953855e4a3
|
||
- cross_workspace_memory:ce9006a3-2313-411f-b577-10bbb9b9c3bb
|
||
- cross_workspace_memory:b3fc5d7e-f1d7-4a63-860b-37f9f35cb136
|
||
- cross_workspace_memory:41e5bdb5-a67b-49bc-b8a6-ab20b4c66fca
|
||
- cross_workspace_memory:23bcc4c0-4992-41d6-b70e-210937a76a0f
|
||
- cross_workspace_memory:db92ba17-fcee-4f1d-9593-6b325105e482
|
||
- cross_workspace_memory:340af5e9-b3e5-423a-9971-b370992738ce
|
||
- cross_workspace_memory:b70c1a22-6834-4e59-936c-1945b04273b7
|
||
- memory:bf88c265-4749-4c50-85bc-4bae25298cd5
|
||
- memory:5ed86f53-b53e-4534-8e51-d3a010069d5e
|
||
- memory:105b328f-4bda-4641-90a7-7282ef156316
|
||
- memory:3f91189b-11a1-45bb-8357-4f413dc1609d
|
||
job_cited_source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
conflicts: []
|
||
supersedes: []
|
||
preferences:
|
||
- statement: Use the simplest correct implementation (KISS & YAGNI).
|
||
level: global
|
||
workspace_types: []
|
||
workspace_ids: []
|
||
source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
counterexample_source_ids: []
|
||
occurrence_count: 1
|
||
explicit: true
|
||
confidence: 1.0
|
||
status: current
|
||
- statement: Default commit only; push only on explicit request.
|
||
level: global
|
||
workspace_types: []
|
||
workspace_ids: []
|
||
source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
counterexample_source_ids: []
|
||
occurrence_count: 1
|
||
explicit: true
|
||
confidence: 1.0
|
||
status: current
|
||
- statement: Run on Windows + WSL2 + Docker Desktop; containers use host.docker.internal
|
||
and listen on 0.0.0.0.
|
||
level: global
|
||
workspace_types: []
|
||
workspace_ids: []
|
||
source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
counterexample_source_ids: []
|
||
occurrence_count: 1
|
||
explicit: true
|
||
confidence: 1.0
|
||
status: current
|
||
- statement: Configure Docker Desktop proxy to Manual with HTTP/HTTPS at http://127.0.0.1:7897.
|
||
level: global
|
||
workspace_types: []
|
||
workspace_ids: []
|
||
source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
counterexample_source_ids: []
|
||
occurrence_count: 1
|
||
explicit: true
|
||
confidence: 1.0
|
||
status: current
|
||
- statement: Never perform blocking I/O inside async def; use def in FastAPI.
|
||
level: global
|
||
workspace_types: []
|
||
workspace_ids: []
|
||
source_ids:
|
||
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
|
||
counterexample_source_ids: []
|
||
occurrence_count: 1
|
||
explicit: true
|
||
confidence: 1.0
|
||
status: current
|
||
source_cursor: 571
|
||
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
|
||
prompt_version: 2026-08-12.3
|
||
schema_version: '3'
|
||
curation_job_id: null
|
||
created_at: '2026-08-08T07:55:39.614383+00:00'
|
||
updated_at: '2026-09-23T14:50:10.142099+00:00'
|
||
tags:
|
||
- development
|
||
- global
|
||
- context
|
||
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
|
||
---
|
||
|
||
# Current Development Context (Global)
|
||
|
||
## Core Principles
|
||
- Use the simplest correct implementation (KISS & YAGNI) and re‑use existing project frameworks, services, tools, and conventions. Avoid speculative dependencies or abstractions.
|
||
|
||
## Memory Workflow
|
||
- All project notes are kept exclusively in `aidocs/project_context.md`. The file has a fixed header and is never committed to the repository (`.gitignore`). Entries are added newest‑first with a second‑level timestamp.
|
||
|
||
## Git Commit Convention
|
||
- Default is to **commit only**; a push occurs only on explicit request.
|
||
- Commit messages follow the form `type: 中文一句话描述` where `type` ∈ `feat`, `fix`, `refactor`, `style`, `docs`, `chore`, `revert`.
|
||
|
||
## Development Platform
|
||
- Windows + WSL2 + Docker Desktop (Linux containers).
|
||
- Containers access host services via `host.docker.internal`. The host must listen on `0.0.0.0`.
|
||
- Bridge‑network access to host‑mapped ports uses the gateway address `172.17.0.1`.
|
||
|
||
## Docker Hub Proxy
|
||
- Docker Desktop must be set to **Manual** with both HTTP and HTTPS pointing to `http://127.0.0.1:7897`. Restart Docker and verify `docker pull` successful before any build.
|
||
|
||
## Common Technical Pitfalls and Mitigations
|
||
- **FastAPI async** – Never perform blocking I/O inside `async def` (pymysql, requests, file I/O, etc.). Use `def` so FastAPI moves it to a thread‑pool.
|
||
- **PowerShell JSON** – Write JSON to a temporary file then send with `curl.exe --data-binary @file` to preserve quotes.
|
||
- **Large‑table SQL** – Add indexes on commonly queried text columns; unify DB `read/write_timeout=3600s` and client upload/run timeouts `1800s/7200s`.
|
||
- **Docker Exec timeout** – Obtain raw socket and call `socket.settimeout(None)` to disable the default 3 s timeout.
|
||
- **Wheel & sdist download** – Use `--platform manylinux2014_x86_64` for manylinux wheels; for sdist‑only packages download tar.gz via PyPI JSON API.
|
||
- **Docker Hub proxy** – Configure Docker Desktop to use Manual proxy with HTTP/HTTPS at `http://127.0.0.1:7897` and restart.
|
||
|
||
## Git Rules
|
||
- See curated rule `cross_workspace_memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2` for commit style and default local‑only commits.
|
||
|
||
## Project Memory Management
|
||
- All notes kept in `aidocs/project_context.md`. The `aidocs/` directory is in `.gitignore` and never committed. |