Files
Blanton_TTL_Script_Diag/secret/README.md
T
etwenandClaude Opus 5 318e656744 docs(arch): Add ARCHITECTURE and CLAUDE, init repo
Bring the Diag-OS variant of the Blanton A/B/C Tera Term scripts under
version control, alongside the SONiC-based Blanton_TTL_Script.

- ARCHITECTURE.md: Diag OS flow, acc_* command taxonomy, swutil addressing,
  TH6 test sequence side effects, and a 6-phase roadmap
- CLAUDE.md: stack, per-script command inventory, conventions, footguns
- .gitattributes: keep .ttl as CRLF (Windows-only), LF for everything else
- .gitignore: secret/, For_AI/, *.log, publish/ output
- secret/: README + config_secret.ttl.example for per-unit overrides
- Logs/ and utils/ placeholders (logopen needs Logs/ to pre-exist)

Known gaps documented, not fixed here: 2_Blanton_Script_B.ttl includes
utils/show_margin_status.ttl which does not exist yet, and its while loop
has no pause despite the "every 10mins" comment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoEiorvuhmdTkpZWtEhJwq
2026-08-18 22:45:07 +08:00

41 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# secret/ — 本機 / 現場敏感資料
這個資料夾集中放**不能進 git** 的東西:per-unit 的 COM port 與序號、prompt 覆寫、
(未來若 Diag image 加上登入的)帳密、客戶提供但未公開的附件。
> ️ 本專案的 Diag OS **開機直接是 root、沒有登入互動**,所以目前 repo 內沒有任何帳密。
> `secret/` 先建起來,是為了 per-unit 覆寫與客戶未公開附件;等真的需要時
> 在 `config.ttl` 加一行 `include "config_secret.ttl"` 即可接上。
## Committed vs Ignored
`.gitignore` 規則是 `secret/*` 搭配 `!secret/README.md` / `!secret/*.example` / `!secret/.gitkeep`
| 檔案 | 狀態 | 說明 |
|------|------|------|
| `README.md` | ✅ committed | 本說明 |
| `config_secret.ttl.example` | ✅ committed | 現場參數範本,敏感欄位一律 `__CHANGE_ME__` |
| `config_secret.ttl` | 🚫 ignored | **實際** per-unit 值 / 帳密 |
| `*.local.*` | 🚫 ignored | 其他 per-unit 覆寫 |
| `*.pem` / `*.key` / `*.env` | 🚫 ignored | 憑證、金鑰 |
| 客戶未公開附件 | 🚫 ignored | diag 指令手冊草稿、schematic、內部 spec 等 |
## 第一次使用
```bash
cp secret/config_secret.ttl.example secret/config_secret.ttl
# 編輯 secret/config_secret.ttl,把 __CHANGE_ME__ 換成實際值
```
Tera Term 端把整包 `src/Script_ABC_Blanton_Diag/` 複製到工作目錄時,**一併把
`secret/config_secret.ttl` 放到 `src/Script_ABC_Blanton_Diag/` 同層**。
現場機器上的那份不要再複製回 repo。
## 鐵則
- 🔒 **commit 前先 grep 一次**`git grep -nE 'password|passwd|PaSsWoRd' -- . ':!secret'`
應該只找得到變數名與 placeholder,不該出現真值。
- 🔒 `.example` 檔內敏感欄位一律寫 `__CHANGE_ME__`,不留 `your_password` 這種半吊子 placeholder。
- 🔒 **本 repo 在 Gitea 上是 public**(依專案指示設定)。放進 `docs/` 或任何 committed 路徑的東西
一律當成「會被外人看到」處理;客戶未公開文件只能放 `secret/``For_AI/`