diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index e32ea5ae..486a460f 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,31 @@ +## 2026-06-24|StockPlatform v2 dev baseline owner decision package + +**背景**:Blocked products pick list 將 StockPlatform v2 排在第六候選。本輪只讀 `/Users/ogt/stockplatform-v2`,目標是把 `3800` 個 untracked 先拆成 source candidates 與 generated outputs;沒有 commit、branch、push、讀 `.env` 或讀 secret value。 + +**只讀 readback**: +- local branch:`main`。 +- local HEAD:`1ef097e148ff6645e608fe5823aff9f038314512`。 +- Gitea main:`1ef097e148ff6645e608fe5823aff9f038314512`。 +- Gitea `dev`:missing。 +- tracked modified:`60`。 +- tracked deleted:`0`。 +- untracked:`3800`。 +- diff shortstat:`60 files changed, 8355 insertions(+), 3173 deletions(-)`。 +- untracked 分桶:`tmp_generated=3742`、`source_candidate=58`、`apps=31`、`docs=8`、`scripts=19`。 +- 最大 generated buckets:`tmp/admin-mobile-layout-audit=1985`、`tmp/mobile-layout-audit=1687`、`tmp/mobile-layout-smoke=23`、`tmp/desktop-layout-smoke=23`、`tmp/public-layout-audit=17`。 +- `git diff --check`:failed,`AiCopilot.tsx` 與 `OpportunityMatrix.tsx` 有 trailing whitespace。 +- env-like paths observed but not read:`.env.example`、`.env.production.local`。 + +**文件**: +- `docs/operations/stockplatform-v2-dev-baseline-owner-decision.snapshot.json` +- `docs/operations/STOCKPLATFORM-V2-DEV-BASELINE-OWNER-DECISION-2026-06-24.md` + +**判定**:StockPlatform v2 不能直接建立遠端 `dev`。local HEAD 與 Gitea main 一致,但 worktree 混合 `60` 個 tracked product changes、`58` 個 untracked source candidates 與 `3742` 個 generated outputs;必須先排除 `tmp/**`,再由 owner 決定 source-only include / exclude。 + +**下一步**:建立 source-only owner response,明確排除 `tmp/**` generated outputs,並決定 Nginx / Docker compose / ingestion cron / official source registry / market freshness monitors 是否同屬同一 dev baseline。 + +**邊界**:沒有產品 repo 寫入、沒有 remote write、沒有 runtime write、沒有 secret collection、沒有 ingestion / smoke / browser audit;Mac Mini / MacBook Pro 仍不得把 StockPlatform v2 視為雙機可開發 ready。 + ## 2026-06-24|VibeWork dev baseline owner decision package **背景**:Blocked products pick list 將 VibeWork 排在第五候選,但它不是 clean dev bootstrap;本輪只讀 `/Users/ogt/Documents/VibeWork`,確認此產品已進入大面積 commercial / MCP / payment / runtime drift。沒有 commit、branch、push、讀 `.env` 或讀 secret value。 diff --git a/docs/operations/STOCKPLATFORM-V2-DEV-BASELINE-OWNER-DECISION-2026-06-24.md b/docs/operations/STOCKPLATFORM-V2-DEV-BASELINE-OWNER-DECISION-2026-06-24.md new file mode 100644 index 00000000..8736e64f --- /dev/null +++ b/docs/operations/STOCKPLATFORM-V2-DEV-BASELINE-OWNER-DECISION-2026-06-24.md @@ -0,0 +1,91 @@ +# StockPlatform v2 Dev Baseline Owner Decision + +- generated_at: `2026-06-24T14:02:36+08:00` +- product_id: `stockplatform-v2` +- local_path: `/Users/ogt/stockplatform-v2` +- status: `high risk, generated output split required` + +## Readback + +| Gate | Result | +|------|--------| +| local branch | `main` | +| local head | `1ef097e148ff6645e608fe5823aff9f038314512` | +| Gitea main | `1ef097e148ff6645e608fe5823aff9f038314512` | +| Gitea dev | missing | +| tracked modified | `60` | +| tracked deleted | `0` | +| untracked | `3800` | +| diff shortstat | `60 files changed, 8355 insertions(+), 3173 deletions(-)` | +| diff check | failed: trailing whitespace in two frontend files | + +## Untracked 分桶 + +| Bucket | Count | 判定 | +|--------|------:|------| +| `tmp` generated outputs | `3742` | 預設排除,不可直接進 source control | +| source candidates | `58` | 需 owner include / exclude | +| apps | `31` | 需審 | +| docs | `8` | 需審 | +| scripts | `19` | 需審 | + +最大 generated buckets: + +- `tmp/admin-mobile-layout-audit`: `1985` +- `tmp/mobile-layout-audit`: `1687` +- `tmp/mobile-layout-smoke`: `23` +- `tmp/desktop-layout-smoke`: `23` +- `tmp/public-layout-audit`: `17` + +## Tracked Modified Groups + +- Admin app:dashboard、data gate / source / evidence / intelligence / notifications / reviews / diagnostics / tasks / trading / watchlist panels。 +- API routes / services:backtest、copilot、ETF、intelligence、MCP、RAG、recommendations、stocks、subscriptions、system、trading、watchlists、notification charts / delivery。 +- Web app:manifest、AI Copilot、analytics provider、risk asset panel、decision terminal、impact terminal、market trend、recommendation dashboard、share report、stock research、charts、timeline、market snapshot。 +- Docs / runtime:crawler / ingestion plan、product IA、production compose、Nginx admin-auth edge conf。 +- Ingestion / ops:official market sync、intelligence feed ingestion、deployment scripts、cron health monitor、market / margin ingestion、route and notification smoke scripts。 + +## Untracked Source Candidates + +- Admin app:agents、audit、data sources、evidence、intelligence、notifications、publishing、reviews、source diagnostics、tasks、trading、watchlist pages。 +- API / migrations:agents route、data source SLA、official source registry、notification report / snapshot / lifecycle / audit trail migrations。 +- Web app:design assets、Phase6 shell、intelligence / recommendations / stocks / transparency / watchlist pages。 +- Docs:Gemini output intake、UI design governance、legacy StockPlatform deprecation、production entrypoints、data governance risk register、historical data UX / navigation、modularization todo、production governance checklist。 +- Ingestion / ops:source registry、legacy entrypoint guard、data freshness monitors、market index / EOD / YTD / price ingestion、source remediation task、content governance smoke、layout smoke、route guard、release checklist artifact、visual regression smoke。 + +Env-like paths observed but not read: + +- `.env.example` +- `.env.production.local` + +## 判定 + +StockPlatform v2 不能直接建立遠端 `dev`。雖然 local HEAD 與 Gitea main 完全一致,這是好事;但目前 worktree 同時包含: + +1. `60` 個 tracked product changes。 +2. `58` 個 untracked source candidates。 +3. `3742` 個 `tmp/` 生成物,包括 Chrome / CDP profile、cache、layout audit 與 smoke 產物。 +4. Nginx、Docker compose、market ingestion、official source registry、data freshness monitors、API migrations 與 public / admin UI change。 + +直接推 remote `dev` 會把生成物和未審核 production / ingestion 變更混進雙機開發基準。 + +## Owner Decision + +需要 owner 回覆: + +1. 是否同意 `tmp/**` generated outputs 預設排除。 +2. 58 個 source candidates 哪些要納入。 +3. 60 個 tracked modified files 哪些要納入。 +4. `.env.example` 與 `.env.production.local` 僅能 metadata-only review,不讀 / 不收 secret value。 +5. 是否先修 `AiCopilot.tsx` 與 `OpportunityMatrix.tsx` trailing whitespace,再進 review branch。 +6. production Nginx、Docker compose、ingestion cron、official source registry、market freshness monitors 是否屬於同一個 dev baseline scope。 +7. owner 接受 source-only include / exclude 後,才可建立 review branch 或 remote `dev`。 + +## 安全邊界 + +- 未讀 `.env` 類內容。 +- 未讀 secret value。 +- 未修改 StockPlatform repo。 +- 未建立 branch、commit 或 push。 +- 未同步 `tmp/**` generated outputs。 +- 未執行 ingestion、smoke、browser audit、production write 或 runtime write。 diff --git a/docs/operations/stockplatform-v2-dev-baseline-owner-decision.snapshot.json b/docs/operations/stockplatform-v2-dev-baseline-owner-decision.snapshot.json new file mode 100644 index 00000000..e7afad97 --- /dev/null +++ b/docs/operations/stockplatform-v2-dev-baseline-owner-decision.snapshot.json @@ -0,0 +1,226 @@ +{ + "schema_version": "stockplatform_v2_dev_baseline_owner_decision_v1", + "generated_at": "2026-06-24T14:02:36+08:00", + "product_id": "stockplatform-v2", + "local_path": "/Users/ogt/stockplatform-v2", + "gitea_repo": "wooo/stockplatform-v2", + "remote_refs": { + "main": "1ef097e148ff6645e608fe5823aff9f038314512", + "dev": "" + }, + "local_readback": { + "branch": "main", + "head": "1ef097e148ff6645e608fe5823aff9f038314512", + "tracked_modified_count": 60, + "tracked_deleted_count": 0, + "untracked_count": 3800, + "diff_shortstat": "60 files changed, 8355 insertions(+), 3173 deletions(-)", + "diff_check": "failed_trailing_whitespace_in_two_frontend_files", + "status": "high_risk_generated_output_split_required" + }, + "untracked_classification": { + "tmp_generated_output_count": 3742, + "source_candidate_count": 58, + "apps_count": 31, + "docs_count": 8, + "scripts_count": 19, + "assets_count": 0, + "other_count": 0, + "largest_generated_buckets": [ + { + "path": "tmp/admin-mobile-layout-audit", + "count": 1985 + }, + { + "path": "tmp/mobile-layout-audit", + "count": 1687 + }, + { + "path": "tmp/mobile-layout-smoke", + "count": 23 + }, + { + "path": "tmp/desktop-layout-smoke", + "count": 23 + }, + { + "path": "tmp/public-layout-audit", + "count": 17 + } + ] + }, + "tracked_modified_groups": { + "admin_app": [ + "apps/admin/src/app/admin-dashboard.tsx", + "apps/admin/src/app/components/DataGatePanel.tsx", + "apps/admin/src/app/components/DataSourcesPanel.tsx", + "apps/admin/src/app/components/EvidencePanel.tsx", + "apps/admin/src/app/components/IntelligencePanel.tsx", + "apps/admin/src/app/components/NotificationsPanel.tsx", + "apps/admin/src/app/components/OverviewCards.tsx", + "apps/admin/src/app/components/ReviewsPanel.tsx", + "apps/admin/src/app/components/SourceDiagnosticsPanel.tsx", + "apps/admin/src/app/components/TasksPanel.tsx", + "apps/admin/src/app/components/TradingPanel.tsx", + "apps/admin/src/app/components/WatchlistPanel.tsx" + ], + "api_routes_and_services": [ + "apps/api/app/api/routes/backtest.py", + "apps/api/app/api/routes/copilot.py", + "apps/api/app/api/routes/etf.py", + "apps/api/app/api/routes/intelligence.py", + "apps/api/app/api/routes/mcp.py", + "apps/api/app/api/routes/rag.py", + "apps/api/app/api/routes/recommendations.py", + "apps/api/app/api/routes/stocks.py", + "apps/api/app/api/routes/subscriptions.py", + "apps/api/app/api/routes/system.py", + "apps/api/app/api/routes/trading.py", + "apps/api/app/api/routes/watchlists.py", + "apps/api/app/main.py", + "apps/api/app/services/notification_charts.py", + "apps/api/app/services/notification_delivery.py" + ], + "web_app": [ + "apps/web/public/manifest.json", + "apps/web/src/app/components/AiCopilot.tsx", + "apps/web/src/app/components/AnalyticsProvider.tsx", + "apps/web/src/app/components/GlobalRiskAssetPanel.tsx", + "apps/web/src/app/components/HomeDecisionTerminal.tsx", + "apps/web/src/app/components/IntelligenceImpactTerminal.tsx", + "apps/web/src/app/components/MarketTrendDashboard.tsx", + "apps/web/src/app/components/RecommendationTerminalDashboard.tsx", + "apps/web/src/app/components/ShareReportButton.tsx", + "apps/web/src/app/components/StockResearchTerminal.tsx", + "apps/web/src/app/components/charts/CandidateScoreChart.tsx", + "apps/web/src/app/components/charts/OpportunityMatrix.tsx", + "apps/web/src/app/components/ui/HistoricalTimeline.tsx", + "apps/web/src/app/components/ui/ProMarketSnapshot.tsx" + ], + "docs_and_runtime": [ + "docs/v2/crawler-accuracy-and-ingestion-plan.md", + "docs/v2/product-ia-and-design.md", + "infra/docker/docker-compose.production.yml", + "infra/nginx/stockplatform-v2-edge.admin-auth.conf" + ], + "ingestion_and_ops": [ + "scripts/ingestion/README.md", + "scripts/ingestion/fetch_intelligence_feeds.py", + "scripts/ingestion/link_intelligence_securities.py", + "scripts/ingestion/sync_official_market_index_daily.py", + "scripts/ops/deploy-production-services.sh", + "scripts/ops/install-production-cron.sh", + "scripts/ops/run-cron-health-monitor.sh", + "scripts/ops/run-intelligence-sync.sh", + "scripts/ops/run-margin-short-ingestion.sh", + "scripts/ops/run-with-cron-lock.sh", + "scripts/ops/stockplatform-admin-route-smoke.sh", + "scripts/ops/stockplatform-notification-format-smoke.sh", + "scripts/ops/stockplatform-production-smoke.sh", + "scripts/ops/stockplatform-trade-validation-smoke.sh", + "scripts/ops/stockplatform-web-route-smoke.sh" + ] + }, + "untracked_source_candidates": { + "admin_app": [ + "apps/admin/src/app/agents/page.tsx", + "apps/admin/src/app/audit/page.tsx", + "apps/admin/src/app/components/DataCenterPanel.tsx", + "apps/admin/src/app/data-sources/page.tsx", + "apps/admin/src/app/evidence/page.tsx", + "apps/admin/src/app/intelligence/page.tsx", + "apps/admin/src/app/notifications/page.tsx", + "apps/admin/src/app/publishing/page.tsx", + "apps/admin/src/app/reviews/bulk-decision/route.ts", + "apps/admin/src/app/reviews/page.tsx", + "apps/admin/src/app/source-diagnostics/page.tsx", + "apps/admin/src/app/tasks/page.tsx", + "apps/admin/src/app/trading/page.tsx", + "apps/admin/src/app/watchlist/page.tsx" + ], + "api_and_migrations": [ + "apps/api/app/api/routes/agents.py", + "apps/api/app/services/data_source_sla.py", + "apps/api/app/services/official_source_registry.json", + "apps/api/migrations/versions/20260601_0031_nemotron_pilot_runs.py", + "apps/api/migrations/versions/20260613_0032_notification_report_snapshots.py", + "apps/api/migrations/versions/20260613_0033_notification_snapshot_exports.py", + "apps/api/migrations/versions/20260613_0034_notification_lifecycle_events.py", + "apps/api/migrations/versions/20260613_0035_notification_action_audit_trail.py" + ], + "web_app": [ + "apps/web/public/assets/design/logo.png", + "apps/web/public/assets/design/ui_mockup.png", + "apps/web/src/app/components/Phase6PublicPageShell.tsx", + "apps/web/src/app/intelligence/page.tsx", + "apps/web/src/app/recommendations/page.tsx", + "apps/web/src/app/stocks/page.tsx", + "apps/web/src/app/template.tsx", + "apps/web/src/app/transparency/page.tsx", + "apps/web/src/app/watchlist/page.tsx" + ], + "docs": [ + "docs/GEMINI_OUTPUT_INTAKE.md", + "docs/UI_DESIGN_GOVERNANCE.md", + "docs/operations/legacy-stockplatform-deprecation.md", + "docs/operations/production-entrypoints.md", + "docs/v2/data-governance-risk-register.md", + "docs/v2/historical-data-ux-and-navigation-todo.md", + "docs/v2/modularization-and-optimization-todo.md", + "docs/v2/production-governance-ux-acceptance-checklist.md" + ], + "ingestion_and_ops": [ + "scripts/ingestion/official_source_registry.json", + "scripts/ops/check-no-legacy-prod-entrypoints.sh", + "scripts/ops/run-data-freshness-monitor.sh", + "scripts/ops/run-intelligence-freshness-monitor.sh", + "scripts/ops/run-market-index-ingestion.sh", + "scripts/ops/run-official-eod-bulk-ingestion.sh", + "scripts/ops/run-official-ytd-backfill.sh", + "scripts/ops/run-price-ingestion.sh", + "scripts/ops/run-source-remediation-task.sh", + "scripts/ops/stockplatform-admin-content-action-smoke.mjs", + "scripts/ops/stockplatform-content-governance-smoke.mjs", + "scripts/ops/stockplatform-content-governance.mjs", + "scripts/ops/stockplatform-layout-smoke.sh", + "scripts/ops/stockplatform-mobile-layout-smoke.mjs", + "scripts/ops/stockplatform-production-route-guard.sh", + "scripts/ops/stockplatform-public-content-action-smoke.mjs", + "scripts/ops/stockplatform-release-checklist-artifact.sh", + "scripts/ops/stockplatform-smoke-route-registry-cli.mjs", + "scripts/ops/stockplatform-visual-regression-smoke.mjs" + ] + }, + "generated_outputs_excluded_by_default": [ + "tmp/admin-mobile-layout-audit/**", + "tmp/mobile-layout-audit/**", + "tmp/mobile-layout-smoke/**", + "tmp/desktop-layout-smoke/**", + "tmp/public-layout-audit/**", + "tmp/*.png", + "tmp/*-smoke/**" + ], + "secret_or_env_paths_seen_but_not_read": [ + ".env.example", + ".env.production.local" + ], + "risk_assessment": { + "secret_value_collected": false, + "env_file_read": false, + "runtime_write_performed": false, + "product_repo_write_performed": false, + "remote_write_performed": false, + "risk_level": "high_generated_output_split_required", + "reason": "Local HEAD equals Gitea main, but the working tree mixes 60 tracked product changes, 58 untracked source candidates, and 3742 tmp generated outputs. Direct dev branch creation would preserve generated Chrome audit artifacts and unreviewed production route / data ingestion changes." + }, + "owner_decision_required": [ + "Approve excluding tmp generated outputs by default.", + "Approve or reject the 58 source candidates grouped by admin app, API / migrations, web app, docs, ingestion, and ops.", + "Approve or reject the 60 tracked modified files grouped by admin, API, web, docs/runtime, and ingestion/ops.", + "Confirm .env.example and .env.production.local handling remains metadata-only with no secret value collection.", + "Fix or explicitly defer trailing whitespace in apps/web/src/app/components/AiCopilot.tsx and apps/web/src/app/components/charts/OpportunityMatrix.tsx.", + "Confirm whether production Nginx, Docker compose, ingestion cron, official source registry, and market data freshness monitors are in the same dev baseline scope.", + "Approve remote dev branch only after source candidates and generated-output exclusions are accepted." + ], + "recommended_next_step": "Prepare a source-only owner response that excludes tmp generated outputs, then create a review branch before any remote dev branch creation." +}