בס״ד

MISv7.1gsheet — Tab Audit (2026-04-28)

docs/MIS_TAB_AUDIT_2026-04-28.md · last changed (pre-VM history) · rendered from GitHub master

MIS_v7.1_gsheet — Tab Audit (2026-04-28)

Generated overnight Session 17 prep for FSE Session 1 (foundation).
Read-only audit of the live production sheet. No modifications.
Source: Drive read_file_content returns a single concatenated markdown stream of all tabs (no tab-name delimiters), so each tab below was identified by header-row + width + content + cross-reference to MIS/src/Code.js (buildXxx) and MIS/src/emailDailySnapshot.js (MIS_CFG.support / MIS_CFG.aliases). The sheet name is "MIS_v7.1_gsheet" but the in-sheet CONTROL!VERSION reads MIS MASTER v11.0f — so the script is v11.0f (per emailDailySnapshot.js), the builder is v7.6 (per Code.js), and the file label is v7.1. That mismatch is real and worth flagging on its own.


Tab inventory caveat — counts inferred, not enumerated

The Drive natural-language export concatenates all tabs without headers or page breaks. I identified 35 distinct table sections by detecting markdown header→separator pairs. Mapping each section to a tab name required cross-reference with the build code. I'm confident on 28 mappings and have flagged the rest. Sam should run a real tab list (e.g. =SHEETNAMES() via custom func, or visually) to confirm — but the row counts and shapes here are accurate.


Summary table

# Tab Name Built by (Code.js / emailDailySnapshot.js) Type Observed rows State Recommendation Notes
1 EARNINGS_MASTER misRefreshEarningsMaster_() (emailDailySnapshot.js:1142+) Data — earnings cache 184 tickers LIVE — refreshed 2026-04-23 from FINNHUB; ~30 ETFs marked NONE/Low KEEP Production data feed; downstream of Tickers!J propagation
2 Reference_Rules buildReferenceRules (Code.js:93) Config — VIX bands + risk params 8 rules LIVE KEEP Used by Daily_Snapshot.B1 regime lookup, FSE will reference these too
3 Tickers buildTickers (Code.js:122) Config — universe + Include flag ~184 LIVE — current Earnings Date column populated from EARNINGS_MASTER (April-July 2026 dates visible) KEEP Header column J is Current Earnings Date in live sheet vs. Next Earnings Date in Code.js:135 — rebuild would clobber. Schema drift.
4 Catalyst_Engine buildCatalystEngine (Code.js:178) Data — manual + auto-fed sentiment 26 rows, 2026-04-27 LIVE — ingesting from NEWS_CATALYST KEEP Feeds Momentum_Engine col AF (Event Impact)
5 Momentum_Engine buildMomentumEngine (Code.js:220) Brain — 60-col live computation ~41 active tickers LIVE — most rows compute; some D Perf_Grade rows; Action Flag bug confirmed (most show 🚫 Avoid even when score is healthy because thresholds in code (≥42) don't match observed score range — e.g. AAPL composite 26.4 → Avoid; AEP composite 45.6 → In Sync) REPAIR Action Flag thresholds (Code.js:338) appear miscalibrated; Composite Score formula (AD*0.6+AF*3) caps low without catalysts. FSE must NOT trust raw Action Flag — must re-resolve.
6 Sector_Map (sector→ETF lookup) buildSectorMap (Code.js:384, lines 414-422 build the K:L lookup) Config — sector→ETF 11 sector→ETF rows LIVE KEEP Section 6 is the K:L lookup half; Section 7 is the A:E aggregation half (built by same function)
7 Sector_Map (aggregation half) buildSectorMap (Code.js:384, A:E rollup) Computed 15 sectors LIVE KEEP Same tab as #6 — markdown export split it into two visible blocks because of the formula gap
8 Daily_Snapshot buildDailySnapshot (Code.js:423) Truth source — VIX + regime + treasury + portfolio_start 4 visible rows (VIX 18.02, 10Y 4.336, regime "Neutral") LIVE — values populated; B1 regime label cell ("Regime_Label -->>") may not be visible because export started from row 3 KEEP Per CONTEXT this is the regime/VIX truth source for the email pipeline. FSE depends on it.
9 TradeSignals buildTradeSignals (Code.js:493) Computed — QUERY of Momentum_Engine 184 rows, ordered by SACS desc LIVE — INTC/STX/AMD top, Mag-7 mid, ETFs bottom KEEP Useful but redundant to FSE once built; consider RETIRE post-Phase-5
10 Snapshot buildSnapshot (Code.js:440) Computed — ATR + position sizing 178 tickers LIVE — most rows compute; Stop @ 1.3× ATR feeding execution_playbook KEEP Feeds execution_playbook columns F/H. FSE will read from this for FSE_Stop.
11 Setup_Engine buildSetupEngine (Code.js:509) Manual placeholder 1 row (empty) EMPTY — header only RETIRE Never populated. Code.js builds header only. Already tagged "PLACEHOLDER" in Code.js:637.
12 Playbook_V2 buildPlaybookV2 (Code.js:522) Manual placeholder 1 row (empty) EMPTY — header only RETIRE Per MIS_FSE_ARCHITECTURE.md §3 line 49-50: "Sandbox only. No new features… Must become subordinate to FSE." Confirmed empty.
13 execution_playbook buildExecutionPlaybook (Code.js:535) Computed — bracket orders ~63 BUY LMT rows LIVE but BROKEN — emits BUY LMT for nearly every ticker (AAPL, ABBV, ZM all "BUY LMT") regardless of true Action Flag, because Code.js:544 filter REGEXMATCH(AH, "In Sync") may be returning all rows where AH is non-empty, OR because FILTER is leaking. Per FSE doc §2 line 50: this is the surface that conflicts with email. REPAIR FSE doc Phase 5 explicitly rebuilds this. Until then, do not trust the BUY LMT outputs.
14 Trade_Planner buildTradePlanner (Code.js:566) Manual + Schwab/Fidelity import 21 positions across 2 accounts (Z29720600 "Invest n Save", Z29835692 "JOINT BROK"), all dated 2026-04-14 LIVE KEEP Trade entries are static — Stop/Target columns blank for all 21 rows. Sam to fill. Source for Holdings aggregation.
15 Trade_Log buildTradeLog (Code.js:584) Manual exit log 0 data rows (header only) EMPTY KEEP (structural) Will populate when Sam closes a trade. FSE Phase 5 may add automated writes.
16 Holdings buildHoldings (Code.js:602) Computed pivot of Trade_Planner 2 rows (No open trades \| #N/A) BROKEN REPAIR Header shows toggle "View Account: Schwab" but the FILTER+SUMPRODUCT chain returning #N/A. Per MIS/CONTEXT and FSE doc the brokerage import path is the fragile point. Replaced functionally by HOLDINGS_CLEAN (#32).
17 MARKET_CALENDAR misWriteSupportTabs_() (emailDailySnapshot.js:749) Config — earnings/Fed/OpEx events 8 rows, dates 2026-03-31 → 2026-12-31 LIVE KEEP Used by misGetMarketCalendarLines_()
18 SELF_GRADE misWriteSupportTabs_() (emailDailySnapshot.js:755) Telemetry — run quality grade 71 rows LIVE — running 4/14/2026 → 4/27/2026; grades B/C; HoldingsWarnings 11→18 trending up KEEP The 18 HoldingsWarnings count = the broken Holdings tab's row count. FSE doc references this as Data Health input.
19 BROKER_IMPORT misWriteSupportTabs_() (emailDailySnapshot.js:761) Manual paste target 1 row (header only) EMPTY KEEP (structural) Schwab integration entry point; SCHWAB_CONNECTED=NO per CONTROL row
20 CONTROL misWriteControl_() (emailDailySnapshot.js:681) KEY/VALUE config + secrets 26 rows LIVE — VERSION=MIS MASTER v11.0f, LAST_DATA_REFRESH=4/27/2026 19:36, secrets present (EARNINGS_API_KEY, SCHWAB_CLIENT_SECRET, SCHWAB_REFRESH_TOKEN visible) KEEP Privacy flag: secrets are in plaintext in this tab. Sheet is private but worth confirming visibility settings. SCHWAB_CONNECTED=NO so live broker pull is offline.
21 RUN_LOG misWriteSupportTabs_() (emailDailySnapshot.js:703) Telemetry — every script call 500 rows (likely capped) LIVE — running 3/12/2026 → 4/2/2026 visible; missing 4/3 → 4/26 implies overflow + truncation OR rolling window KEEP Looks like only first 500 rows in the export — actual sheet may be longer. Consider adding row-cap rotation if not already.
22 DIAGNOSTICS misWriteSupportTabs_() (emailDailySnapshot.js:709) Telemetry — module-level WARN/OK 13 rows from 2026-04-27 19:36 LIVE — single run captured; CoreSheet found all 6 aliases OK; SchwabAPI WARN (NO connection); MailApp OK (1490 quota left) KEEP Per FSE Phase 1 §10: this is the verification surface for the Session-1 INTC test
23 Holdings (Schwab subset?) — likely a 4-row block from Holdings tab Schwab view Likely buildHoldings view rendering View 3 rows (AFRM, DAL, MRVL with Account=70010898) LIVE — these 3 are real Schwab positions KEEP (folded into #16) This block in the export is probably the visible pivot from Holdings when toggle = Schwab. Same tab as #16. Verify on sheet.
24 VIX_OPEN_HISTORY misWriteSupportTabs_() (emailDailySnapshot.js:740) Time-series — daily 9:55 VIX 34 rows, 2026-03-12 → 2026-04-27 LIVE — but VIX_Day_High/Low have #NUM! errors for 7 most-recent rows (2026-04-16+) REPAIR Calculation broke ~Apr 16. Likely GOOGLEFINANCE schema drift (high/low for VIX). Doesn't break FSE but worth fixing.
25 NEWS_CATALYST misFetchNewsToSheet_() + misWriteSupportTabs_() (emailDailySnapshot.js:715) News feed 39 rows, all 4/27/2026 19:35:48 LIVE — sentiment scoring active; TICKER_BLOCK / MACRO_OVERRIDE flags being written; MRVL flagged Negative sev-5 = Legal/Reg KEEP Single-snapshot in export — actual sheet likely retains MIS_CFG.news.maxStoredRows = 220. Critical FSE input for NewsRiskFlag.
26 LIVE_GUARD misBuildLiveGuard_() (emailDailySnapshot.js:1317) Computed — per-ticker block decisions 166 tickers LIVE — MRVL=BLOCK (TICKER_BLOCK), JBLU=BLOCK (SHOCK_DOWN -6.65%), UVIX=BLOCK (SHOCK_DOWN), most others freshness=FRESH no-block KEEP This IS the proto-FSE; FSE doc explicitly says LIVE_GUARD's resolver logic moves into FINAL_STATE_ENGINE. Critical input.
27 REPORT_SNAPSHOTS misWriteSupportTabs_() (emailDailySnapshot.js:734) Archive of every email body 184 rows, 3/12/2026 → 4/27/2026 LIVE KEEP Powers playback/audit. FSE doc Phase 6 references reading from history rather than email body parsing.
28 HIST_DAILY_SNAPSHOT misInitHistTab_ (emailDailySnapshot.js:773) + misArchiveDailySnapshot_ (~3144) Append-only history 28 rows, 2026-03-20 → 2026-04-27 LIVE — but VIX_Change, Top5Up, Top5Down, sectors blank for last ~9 rows (2026-04-16+) REPAIR Same regression as #24 — VIX ratio calc broke ~Apr 16. Fix gives FSE clean regime history.
29 HIST_MOMENTUM misInitHistTab_ (emailDailySnapshot.js:768) + misArchiveMomentum_ (~3160) Per-ticker daily archive 119 rows, dates 2026-03-20 onward LIVE KEEP Critical for FSE_HISTORY backfill. 21-column schema matches what FSE doc specifies.
30 HIST_EXECUTION_PLAYBOOK misInitHistTab_ (emailDailySnapshot.js:777) + misArchivePlaybookSummary_ (~3197) Append-only — raw cell values 416 rows from 3/12/2026 18:24:45 single run PARTIAL — only one archive run captured; uses BlockType=VALUE/RowIndex/ColIndex/Value schema (not row-per-record) REPAIR or RETIRE This schema is unusual — archives the raw cell layout rather than a normalized record. Hard to query. Consider replacing with row-per-trade-idea schema once FSE is online.
31 HIST_PLAYBOOK_V2 misInitHistTab_ (emailDailySnapshot.js:781) + misArchivePlaybookSummary_ (~3197) Append-only — raw cell values 205 rows from 3/12/2026 18:24:46 single run PARTIAL — same schema as #30, same single run; archives Sector_Map cell layout (BlockType=VALUE, RowIndex=1, Sector/Avg_RelStr/Max/Min/ETF) REPAIR or RETIRE Mis-named — archives Sector_Map content despite the tab name "PLAYBOOK_V2". Either Code is buggy or tab is genuinely orphaned. Investigate before FSE Phase 6.
32 HOLDINGS_CLEAN misBuildHoldingsClean_() (emailDailySnapshot.js:401, 3331) Computed — clean replacement for Holdings 21 positions across Trade_Planner + Schwab LIVE — SPY 10.954sh / META 10.696 / ASML 4 / AVGO 10 / COST 2 / PYPL 29 / VOO 2 / AFRM 15 / SCHZ 21.376 / KO 6 / etc; all Data_Quality=OK KEEP This is the working positions table. FSE should read from here, not from Holdings (#16).
33 HIST_TRADE_LOG (or proto-Trade_Planner archive) misInitHistTab_ (emailDailySnapshot.js:785) Append-only history of trade ideas 147 rows, 3/20/2026 → 4/3/2026 LIVE — but contains data corruption: AMD row shows Stop = "Saturday, July 7, 1900" (date interpretation of numeric), LYB row shows Stop = "12:44 AM" (time interpretation). Number formatting bug. REPAIR Stop column has number format pollution. Easy fix (set column format to plain number) but worth catching before FSE reads it.
34 (unnamed — Entry/Action signals) Likely an undocumented archive from a Sheet-4 prototype Append-only — 9-col schema (Date · Ticker · CurrentPct · CurrentPrice · EntryAction · RiskAlert · MomRegime · FlowStrength · Reason) 277 rows, 3/20/2026 → 4/3/2026 PARTIAL — last 5 columns blank for most rows; emoji-laden EntryAction values like "💎 LEAN IN (MAX)" / "🛑 STOP/WAIT" INVESTIGATE then RETIRE Not referenced by MIS_CFG.support or any buildXxx_. Likely the Sheet-4 "Entry Pad" prototype mentioned in FSE doc Phase 9. Has no data after 4/3 — abandoned. Sam to confirm; recommend archive to backup file then RETIRE.
35 (unnamed — NO_HEADER sparkline-feed?) Unknown Numeric+emoji table 649 rows, 2 cols (number 75–100 · emoji label "🚀 Accelerating Up" / "🐢 Decelerating Up") ORPHANED RETIRE Tab literally has no header row. 649 rows of ranked numbers with emoji labels. No build function references. Likely scratch tab from a sparkline experiment. Move to backup, delete from live sheet.

Per-tab detail

EARNINGS_MASTER (#1)

Reference_Rules (#2)

Tickers (#3)

Catalyst_Engine (#4)

Momentum_Engine (#5)

Sector_Map (#6 + #7)

Daily_Snapshot (#8)

TradeSignals (#9)

Snapshot (#10)

Setup_Engine (#11)

Playbook_V2 (#12)

execution_playbook (#13)

Trade_Planner (#14)

Trade_Log (#15)

Holdings (#16)

MARKET_CALENDAR (#17)

SELF_GRADE (#18)

BROKER_IMPORT (#19)

CONTROL (#20)

RUN_LOG (#21)

DIAGNOSTICS (#22)

VIX_OPEN_HISTORY (#24)

NEWS_CATALYST (#25)

LIVE_GUARD (#26)

REPORT_SNAPSHOTS (#27)

HIST_DAILY_SNAPSHOT (#28)

HIST_MOMENTUM (#29)

HIST_EXECUTION_PLAYBOOK (#30)

HIST_PLAYBOOK_V2 (#31)

HOLDINGS_CLEAN (#32)

HIST_TRADE_LOG (#33)

Tab #34 (unnamed Entry/Action signals)

Tab #35 (NO_HEADER orphan)


Counts


Tabs the FSE architecture needs that don't exist yet

Confirmed against docs/MIS_FSE_ARCHITECTURE.md Session 1 plan (lines 202–223):

These three are the Session 1 deliverable per the FSE doc. Phase 1 Steps 2/4/5 explicitly create them with frozen header rows, no formulas yet.

Additionally, FSE doc §6 specifies named ranges (FSE_*, RULES_*, SNAP_*) that don't exist yet but ride on existing tabs (Reference_Rules, Snapshot, the new FSE tab) — those are part of Session 1 step 3.


Cross-cutting findings (worth noting before Session 1)

  1. Version mismatch: file is "MIS_v7.1_gsheet", builder code is v7.6, controller (emailDailySnapshot.js) is v11.0f. The CONTROL tab shows v11.0f. Sam should confirm the file label is just stale.
  2. CONTROL drift: LAST_REGIME=EXTREME / LAST_VIX=27.29 (from 3/12 max) vs Daily_Snapshot showing live VIX 18.02 NORMAL. The dispatcher writes LAST_REGIME but doesn't refresh it on every run, or refresh failed. Worth fixing pre-FSE so FSE doesn't read the stale value.
  3. VIX history calc broke ~Apr 16 across two tabs (#24 + #28). One root cause. Fix once.
  4. Action Flag math is too tight: max composite without catalysts ≈ 45, threshold for "In Sync" is ≥42. Almost no ticker reaches "In Sync" without a positive catalyst. Either the threshold needs to drop OR the formula needs to weigh more inputs. FSE doc says re-resolve in FSE — so this is about whether to fix Momentum_Engine also or just bypass it.
  5. execution_playbook emits BUY LMT for tickers it shouldn't — including ABBV (Downtrend, Composite 16.8, Avoid). The REGEXMATCH filter is leaking. This is the conflict the FSE is built to prevent.
  6. HIST_PLAYBOOK_V2 contains Sector_Map data — bug in misArchivePlaybookSummary_() or genuine orphan. Investigate.
  7. HIST_TRADE_LOG Stop column has type confusion — display-only fix.
  8. Tab #34 + #35 are dead weight — recommend archive + retire before FSE Phase 1 to declutter the universe FSE has to reason about.

Source trail

Generated by Claude Code subagent (general-purpose) for Session 17 overnight prep · Opus 4.7 (1M)

Source trail · docs/MIS_TAB_AUDIT_2026-04-28.md @ master · rendered 2026-07-02 7:23 PM EDT by scripts/build-docs.py · the .md in the repo is the truth; this page is the phone-readable view