Two new menu items live in MIS Tools: 🔑 Migrate Schwab/Finnhub Keys to Script Properties + 🧪 Verify Secrets Status. Run the verify first to see what's where, then migrate, then verify again. Then you can hand-clear the CONTROL tab plaintext rows for SCHWAB_CLIENT_ID/SECRET/REFRESH_TOKEN/ACCOUNT_HASH + EARNINGS_API_KEY. getControlValue_ now reads PropertiesService first for these keys.
EARNINGS_MASTER rate-limit fix is live — re-run "Refresh Earnings Master" and Finnhub will fill MSFT/INTC/LLY/NFLX/ORCL/PYPL/BIDU (which it was rate-limiting before).
Folder verdict: ~60% can move to archive. 32 files / 4 subdirectories are point-in-time artifacts from April-May audits; only ~12 files are operationally live. Section 4 below is the move plan.
| Time | Push | What landed |
|---|---|---|
| 1:58 PM | Planner alias cleanup | emailDailySnapshot.js:51 — dropped 'test entry' pollution from MIS_CFG.aliases.planner. Was tripping fallback lookups. |
| 2:00 PM | SMS alert wiring | 3 new functions (misSendCommandCenterSMS, misSetSMSWebhook, misPostNotify_) + 2 menu items. Reads Command Center cells J3:N11 → posts to notify webhook → Twilio SMS. Same webhook your notify.ps1 uses. |
| 2:26 PM | Finnhub rate-limit fix | Code.js:1162 — added Utilities.sleep(1100) between earnings API calls. Free tier caps 60/min; you were running ~184 calls in 60 sec → 120+ getting 429'd. Fix takes total ~3.4 min, well inside the 6-min Apps Script limit. |
| 2:29 PM | Schwab/Finnhub keys → PropertiesService | 2 new menu items (🔑 Migrate + 🧪 Verify Secrets Status). getControlValue_ now reads PropertiesService first for SCHWAB_*/EARNINGS_API_KEY. CONTROL cells can be cleared after migration verified. |
v1 script (1yBMztL4…) is the only active production target. Old production script 1r9vWL… bound to 1cosuFr… sheet is dormant (triggers should be killed if any still fire). Sam confirmed in earlier session he killed them.
Compact ranking. Subdirectory contents covered in §3.
| Date | File | Status | Why |
|---|---|---|---|
| 5/20 1:55 PM | command center Screenshot 2026-05-20 135453.png | Keep | You just sent it — proves SOSMS string exists at J3:N11. Reference for the SMS wiring. |
| 5/20 1:22 PM | Schwab, May 20.png | Keep | Today's portfolio truth — Schwab side (ABNB/SLV/UNG) |
| 5/20 1:20 PM | Fidelity accounts, May 20.png | Keep | Today's portfolio truth — Fidelity (Invest n Save + Joint Brok) |
| 5/19 8:59 AM | README.md | Keep | Top-level pointer. Mostly current. Worth a tune-up after this session (section header still says "v11.0g" — we're past that now). |
| 5/14 5:13–5:16 PM | Fidelity 1.png / Fidelity 2.png / Schwab main_z.png / Schwab secondary.png | Archive | Superseded by today's screenshots. Move to MIS/archive/screenshots-2026-05-14/. |
| 5/12 3:46 PM | docs/GITHUB_ISSUES_TRIAGE_2026-05-12.md | Keep | Triage of GH issues #3-#10 — reference doc. Stable. |
| 5/12 3:16 PM | FOLDER_INVENTORY.md | Review | 8 days stale; partly outdated. This briefing supersedes it. Either delete or pin a "see 2026-05-20 finalization" link. |
| 5/07 5:49 PM | data/Trade_Log_Imported_22_positions.csv | Archive | Pre-May-20 holdings. Today's reality = 21 positions, AFRM/BA/DAL closed. Superseded by outputs/2026-05-20_14-05_action_holdings-paste-may20-v3-formula-safe.md. |
| 5/07 1:30 PM | src/emailDailySnapshot.js | Archive | Legacy/orphaned old-production code (bound to dead script 1r9vWL). Not active. Keep for reference; never push. |
| 5/07 1:26 PM | 2× Screenshot 2026-05-07 PM.png | Archive | Old portfolio snapshots |
| 5/06 6:38 PM | docs/RUN_3PM_POWER_HOUR_MANUAL.md | Keep | Manual-fire runbook. Still relevant — you may still need it. |
| 5/06 4:32 PM | docs/HOLDINGS_FIX_PASTE_INSTRUCTIONS.md | Archive | Superseded by the May 20 v3 paste-block doc in outputs/. |
| 5/06 4:32 PM | data/Trade_Planner_Replacement.csv | Archive | Old 13-position list. Stale. |
| 5/05 6:17 PM | docs/HOLDINGS_RECONCILIATION.md | Archive | Point-in-time reconciliation from broker CSVs. Historical artifact. |
| 5/05 6:12 PM | data/holdings_reconciled.csv + trade_log_imported.csv | Archive | Same — point-in-time. |
| 5/05 6:12 PM | scripts/build_holdings_reconciled.py | Archive | One-time Python parser. Job done. Move to scripts/archive/ or delete. |
| 5/05 10:32 AM | History_for_Account_Z29720600.csv / Z29835692.csv | Archive | Fidelity raw exports from May 5. Stale; today's reality is 2 weeks later. |
| 5/04 11:11–11:12 PM | MIS_v7.1_audit_error_inventory.csv + audit_sheet_summary.csv + full_audit_report.md + best_effort_formula_repair.xlsx (2.7 MB) | Archive | 5/04 deep audit (Sam ran). Useful as reference — but the .xlsx is huge. Move to MIS/archive/2026-05-04_v7.1-audit/. |
| 5/04 7:31 PM | rebuild mis claude excel build.xlsx | Archive | Excel rebuild artifact, 470KB. Point-in-time. |
| 5/04 7:28 PM | scripts/build_owed_tabs.py | Archive | One-time tab builder. Job done. |
| 5/03 1:34 PM | FINAL_STRUCTURE_RECOMMENDATION.md | Archive | Session 22 recommendation doc. Historical; recommendations have evolved. |
| 5/03 1:30 PM | audits/v2_extracts/ (11 CSVs) | Archive | v2 .xlsx tab mining. One-time extraction. Useful as reference for what the broken v2 had; not actionable. |
| 5/03 1:26 PM | scripts/v11_microservices/Code.gs + appsscript.json | Archive | Extracted V11 Microservices script. Old/dead. Reference only. |
| 5/03 11:50 AM | SCHWAB_898_TRADE_LOG_SEED.csv | Archive | Old Schwab parse (AFRM 15 sh stale; AFRM is closed). |
| 5/03 11:13 AM | scripts/trigger_power_system.js + mobile_command_center.js + audits/SACS_ZScore_Analysis.docx + MIS_V11_Forensic_Teardown.md | Keep | The audits are good reference. The scripts can stay in scripts/ (they're paste-ready Apps Script tooling). Note: scripts/mobile_command_center.js is the SAME as the one in MIS-v1-script/ — but the active copy is in MIS-v1-script/. |
| 5/03 11:37 AM | .gitignore | Keep | Sound. Don't touch. |
| 5/01 3:07 PM | claude_excel_# MIS Handoff Brief — 2026-05-01.txt | Archive | Session 21 handoff. Historical. |
| 5/01 3:05 PM | gemini_Here is the full handoff brief form.txt + Metric Format Range.txt | Archive | Sister handoffs. Historical. |
| 4/30 5:17 PM | notes mis.txt (2.1 MB) | Review | Big voice notes dump. Hard to use. Either grep it for specific topics or archive whole. |
| 3/25 | docs/MIS v7.1 System Hardening.docx + v7.6 Script Audit.docx | Keep | Binary docs you commissioned. Reference. Have not parsed. |
| 1/12 – 3/25 | python/ (v8 builders) + archive/ + docs/Trading_Engine_*.pdf + docs/3PM_*.pdf + Big Keillim TYH.pdf | Keep | Pre-MIS-v1 reference. Not active. Don't touch. |
MIS-v1-script/ Keep — this is THE clasp projectemailDailySnapshot.js — 6,900+ lines · email engine · just got SMS + Secrets functions added · ACTIVECode.js — 1,400 lines · tab builders + earnings refresh · ACTIVEfse_foundation.js — FSE Session 1+3 code · ACTIVEmobile_command_center.js · runSACSUpgrade.js · appsscript.json · .clasp.jsonThis folder is gitignored (per MIS/.gitignore); managed via clasp. All today's pushes landed here. Sole source of truth for v1 script behavior.
src/ Archive — dead production codeOld production clasp project bound to dormant script 1r9vWL…. Files match the v11.0f version from May 7. Not pushed since. Triggers on the old script killed weeks ago. Suggest renaming to src-legacy-v11.0f/ with a header note, OR move to archive/src-v11.0f-2026-05-07/.
scripts/ Reviewmobile_command_center.js — duplicate of the one in MIS-v1-script/. Delete this copy.runSACSUpgrade.js — same. Delete this copy.auto_triggers.js · trigger_power_system.js · MIS_ARCHITECT_COMPLETE_FIXED.js — paste-ready Apps Script tooling. Keep but flag for review later.v11_excerpts_for_v1.gs + v11_microservices/ — old V11 extraction. Archivebuild_owed_tabs.py · build_holdings_reconciled.py — one-time Python tools. Archiveaudits/ Keep — all are good historical referenceMIS_Master_v11_0f_Forensic_Teardown.md · MIS_V11_Forensic_Teardown.md · MIS_1F31z_Forensic_Teardown.md · MIS_Genesis_Context.docx · SACS_ZScore_Analysis.docx — keepv2_extracts/ — 11 CSVs from broken v2 mining. Archive as one bundle.data/ Mostly ArchiveThree large .xlsx exports (MIS_live_export, MIS_v7.1_gsheet, MIS_v8_Mindblown) + four point-in-time CSVs. Archive everything older than 7 days.
docs/ Keep — mixed but usefulMostly stable reference docs. GITHUB_ISSUES_TRIAGE_2026-05-12.md is the most recent active doc.
archive/ + files/ + python/ Already archived / dormantscreenshots/ Keep14 PNGs from Apr 28 / Apr 30 / May 1 / May 6. Reference artifacts.
I will NOT execute these moves without your explicit OK. The workspace policy is mv → archive/graveyard/YYYY-MM-DD_name/ — never rm -rf.
| From | To |
|---|---|
Fidelity 1.png + Fidelity 2.png + Schwab main_z.png + Schwab secondary.png | MIS/archive/2026-05-14_screenshots/ |
Screenshot 2026-05-07 at 1.26.37 PM.png + Screenshot 2026-05-07 at 1.26.54 PM.png | MIS/archive/2026-05-07_screenshots/ |
MIS_v7.1_audit_error_inventory.csv + MIS_v7.1_audit_sheet_summary.csv + MIS_v7.1_full_audit_report.md + MIS_v7.1_best_effort_formula_repair.xlsx | MIS/archive/2026-05-04_v7.1-audit/ |
rebuild mis claude excel build.xlsx | same folder as above |
History_for_Account_Z29720600.csv + History_for_Account_Z29835692.csv | MIS/archive/2026-05-05_fidelity-history/ |
SCHWAB_898_TRADE_LOG_SEED.csv | MIS/archive/2026-05-03_schwab-seed/ |
claude_excel_# MIS Handoff Brief — 2026-05-01.txt + gemini_Here is the full handoff brief form.txt + Metric Format Range.txt | MIS/archive/2026-05-01_handoffs/ |
FINAL_STRUCTURE_RECOMMENDATION.md | MIS/archive/2026-05-03_structure-rec/ |
FOLDER_INVENTORY.md | MIS/archive/2026-05-12_inventory/ — this briefing supersedes |
notes mis.txt (2.1MB) | Your call — grep for keepers first, or archive whole |
| From | To |
|---|---|
src/ (legacy old-production code) | MIS/archive/2026-05-07_src-v11.0f-legacy/ |
scripts/v11_microservices/ + scripts/v11_excerpts_for_v1.gs | MIS/archive/2026-05-03_v11-microservices/ |
scripts/mobile_command_center.js + scripts/runSACSUpgrade.js (duplicates of MIS-v1-script versions) | delete after confirming MIS-v1-script versions are newer |
scripts/build_owed_tabs.py + scripts/build_holdings_reconciled.py | MIS/archive/2026-05-04_one-time-builders/ |
audits/v2_extracts/ (11 CSVs) | MIS/archive/2026-05-03_v2-extracts/ |
data/* (all 7 files older than 7 days) | MIS/archive/2026-05-XX_data/ |
docs/HOLDINGS_FIX_PASTE_INSTRUCTIONS.md + docs/HOLDINGS_RECONCILIATION.md | MIS/archive/2026-05-XX_docs/ |
After moves: top-level MIS/ has ~10 files (README, .clasp files, today's 3 screenshots, this briefing reference, FOLDER_INVENTORY-link-to-this), plus 6 active subdirectories (MIS-v1-script · audits · docs · archive · screenshots · scripts-trimmed).
You asked: "if you want me to move the secret key for Schwab or anything, tell me how to do that, whatever I need to create. If it's the same way through script properties, I can hide my APIs and my keys."
Yes. Same pattern as the SMS webhook setup. Two-click migration shipped today.
| Key | Used for |
|---|---|
SCHWAB_CLIENT_ID | Schwab OAuth flow |
SCHWAB_CLIENT_SECRET | Schwab OAuth flow |
SCHWAB_REFRESH_TOKEN | Schwab API auth refresh |
SCHWAB_ACCOUNT_HASH | Schwab positions endpoint |
EARNINGS_API_KEY | Finnhub API key |
SCHWAB_CALLBACK_URL · SCHWAB_REDIRECT_RESULT | OAuth callback handling |
MIS Tools → 🧪 Verify Secrets Status. Dialog shows each key with first-4 chars from CONTROL tab and from ScriptProperties side-by-side. Initially: CONTROL filled, ScriptProperties empty.
MIS Tools → 🔑 Migrate Schwab/Finnhub Keys to Script Properties. Reads each key from CONTROL → writes the same value into ScriptProperties (same key name). Does NOT clear CONTROL — both copies exist transparently during the migration window.
MIS Tools → 🧪 Verify Secrets Status again. Dialog should now show first-4 chars in BOTH the CONTROL column AND the ScriptProperties column for every key. Both green = safe to clear CONTROL.
Run MIS Tools → Test Schwab API Connection. If that returns OK, code is reading from ScriptProperties correctly via the updated getControlValue_ (which now checks Properties first). Then run Refresh Earnings Master to confirm Finnhub still works.
Open CONTROL tab. For each of these rows, clear the VALUE cell (column B), leave the KEY cell (column A) intact:
Once cleared, the values exist only in ScriptProperties (bound to v1 script project). The sheet is private but ScriptProperties is one layer safer — no row/col reads ever surface them.
Re-run 🧪 Verify Secrets Status. CONTROL column should now read (empty) for the cleared keys, ScriptProperties column should still show first-4 chars. Run Send Morning Brief Now as a smoke test — if email fires cleanly, migration is done.
Migration is reversible: re-paste the secret values back into CONTROL column B. Both code paths work — Properties first, CONTROL fallback.
Same Script Properties pattern works for any API. Worth considering for:
The rule: anything that looks like a secret → ScriptProperties. The CONTROL tab is for tuneable parameters (VIX bands, version stamp, last-run timestamps) — never credentials.
In order of fastest-to-meaningful:
outputs/2026-05-20_14-05_action_holdings-paste-may20-v3-formula-safe.md. Then MIS Tools → Refresh Holdings Clean Only. ~5 mincommand-inbox/.claude-notify.json. ~1 minmv commands to archive in a single commit.Total active time: ~15 min. SMS me when each major step completes (or just at the end with "all done").