Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
41882cc
docs(1028): create phase plan — Tag update perf MEX + SIMD
HanSur94 May 8, 2026
a292ec4
feat(1028-01): add 1000-tag pipeline harness + mex_src dir
HanSur94 May 8, 2026
8fc8799
test(1028-01): add K1..K4 parity test scaffolds
HanSur94 May 8, 2026
7ecc603
test(1028-01): add regression suite for the 5 D-08 benchmark gates
HanSur94 May 8, 2026
d428c04
ci(1028-01): wire bench_tag_pipeline_1k into CI
HanSur94 May 8, 2026
3f0146f
ci(1028-01): upload benchmark-results.json artifact for baseline pull
HanSur94 May 8, 2026
ed7ecd3
fix(1028-01): vectorize harness file I/O + raise wall budget
HanSur94 May 8, 2026
8a34b7e
fix(1028-01): regression suite — assume-skip pre-existing broken benches
HanSur94 May 8, 2026
d96f832
docs(1028-01): set GATE_THRESHOLD_SECONDS = 4.8019 s from CI baseline
HanSur94 May 8, 2026
b7fb18e
feat(1028-02): K1 delimited_parse_mex.c + build_mex.m SensorThreshold…
HanSur94 May 8, 2026
49c55b2
feat(1028-02): dispatchDelimitedParse_ wiring + tBreakdown profile in…
HanSur94 May 8, 2026
7e2e8dd
fix(1028-02): re-calibrate GATE_THRESHOLD_SECONDS for observed CI var…
HanSur94 May 8, 2026
5545988
docs(1028-02): complete K1 delimited_parse_mex plan
HanSur94 May 8, 2026
75de998
feat(1028-02b): DI seam for .mat write suppression in pipelines
HanSur94 May 8, 2026
4d4edd2
feat(1028-02b): wire harness NoIO via DI seam, drop inert path-priori…
HanSur94 May 8, 2026
760b9f4
ci(1028-02b): trigger CI for plan 02b verification
HanSur94 May 8, 2026
fb8a03b
Merge remote-tracking branch 'origin/main' into claude/adoring-ishiza…
HanSur94 May 8, 2026
0940004
docs(1028-02b): complete NoIO measurement-gap fix plan
HanSur94 May 8, 2026
5c75f45
docs(1028-02d): refine D-12-AMENDED to reflect cache mechanism
HanSur94 May 8, 2026
fb45876
feat(1028-02d): add writeTagMatCached_ helper that skips on-disk load
HanSur94 May 8, 2026
ea1a442
feat(1028-02d): wire prior-state cache into LiveTagPipeline (skip per…
HanSur94 May 8, 2026
dcea424
test(1028-02d): add TestPriorStateCacheParity for D-09 byte-equal con…
HanSur94 May 8, 2026
f1c08ae
feat(1028-02d): add --cache-on/--cache-off harness flags + CI cache-o…
HanSur94 May 8, 2026
8977707
Merge remote-tracking branch 'origin/main' into claude/adoring-ishiza…
HanSur94 May 8, 2026
5b622d1
fix(1028-02d): replace isequal(writeFn_,@writeTagMat_) check with exp…
HanSur94 May 8, 2026
264a2a5
docs(1028-02d): complete in-memory prior-state cache plan
HanSur94 May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ jobs:
run: |
xvfb-run octave --eval "addpath(pwd); install(); addpath('scripts'); run_ci_benchmark();"

# Phase 1028 D-07: upload the raw benchmark-results.json so the
# 1000-tag harness baseline can be captured without scraping logs.
- name: Upload benchmark results artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: bench-tag-pipeline-1k-results
path: benchmark-results.json
retention-days: 30

- name: Fix git ownership
run: git config --global --add safe.directory /__w/FastSense/FastSense

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ jobs:
echo "_Results file not produced (test job likely crashed before completion)._" >> "$GITHUB_STEP_SUMMARY"
fi

# Phase 1028 D-06: smoke-run the 1000-tag harness on every push so
# syntax/regressions in the harness itself surface within the test job
# (the gated full bench runs separately in benchmark.yml).
- name: Phase 1028 harness smoke
run: |
xvfb-run octave --eval "addpath(pwd); install(); bench_tag_pipeline_1k('--smoke');"

# Smoke test: ensure Octave MEX sources still compile on macOS.
# Authoritative prebuilt binaries for releases come from refresh-mex-binaries.yml,
# which commits platform-specific binaries into libs/.../octave-<platform>/.
Expand Down
20 changes: 16 additions & 4 deletions .planning/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Full details: [milestones/v3.0-ROADMAP.md](milestones/v3.0-ROADMAP.md)
| 1026. Dashboard time slider preview | pending | 0/? | Not started | — |
| 1027. Companion detachable log window | pending | 5/5 | Complete | 2026-05-08 |
| 1027.1. Independent events/live log detach | pending | 8/8 | Complete | 2026-05-08 |
| 1028. Tag update perf — MEX + SIMD | pending | 0/? | Not started | |
| 1028. Tag update perf — MEX + SIMD | pending | 3/6 (+ 02b/02d insertions) | In Progress | Wave-1.5 cache lands; Plans 03/04/05 ahead |

## Phase Details (Pending Milestone)

Expand Down Expand Up @@ -183,11 +183,23 @@ Plans:

### Phase 1028: Tag update perf — MEX + SIMD

**Goal:** Profile and accelerate the tag update path (SensorTag/StateTag/MonitorTag/CompositeTag streaming + recompute). Identify hot spots and replace with C MEX kernels using SIMD (AVX2 / NEON) where it pays off, consistent with existing FastSense MEX patterns.
**Goal:** Profile and accelerate the tag update path at the 1000-tag × N-source × 1-session workload anchor (CONTEXT.md D-01). Land MEX kernels (K1 delimited_parse, K2 monitor_fsm, K3 composite_merge, K4 aggregate_matrix) behind transparent .m fallback dispatch (D-09), and conditionally land Stage 2 architectural seams (A1+A2 listener coalescing) gated on Stage-1 measurement (D-05). All 5 existing benchmark gates remain green throughout (D-08); no public API changes (D-10); DerivedTag.UserFn untouched (D-11); .mat write cadence unchanged (D-12).

**Promoted from:** Backlog 999.5 (2026-05-08)
**Requirements:** TBD
**Plans:** 0 plans
**Decisions:** D-01..D-12 from .planning/phases/1028-tag-update-perf-mex-simd/1028-CONTEXT.md (no formal REQ-IDs for v3.x)
**Plans:** 2/6 plans executed

Plans:
- [x] 1028-01-PLAN.md — Wave 0: 1000-tag harness + parity scaffolds + regression suite + CI wiring + baseline measurement
- [x] 1028-02-PLAN.md — Wave 1: K1 delimited_parse_mex + .m fallback dispatch
- [x] 1028-02b — Wave 1.5 (insertion, no formal PLAN.md): NoIO measurement-gap fix via DI seam (`writeFn_` private + Hidden `setWriteFnForTesting_`); clean tBreakdown shows 65% of WithIO tick is .mat I/O
- [x] 1028-02d — Wave 1.5 (insertion, no formal PLAN.md): in-memory prior-state cache eliminating per-tick `load()` inside `writeTagMat_('append',...)`; D-09 byte-equal parity (TestPriorStateCacheParity); D-10 / D-12 preserved
- [ ] 1028-03-PLAN.md — Wave 2: K2 monitor_fsm_mex (fused hysteresis+debounce+findRuns) + .m fallback
- [ ] 1028-04-PLAN.md — Wave 3: K3 composite_merge_mex + K4 aggregate_matrix_mex (6 structural modes) + fallbacks
- [ ] 1028-05-PLAN.md — Wave 4 (CONDITIONAL): Stage 2 architectural — A1 listener coalescing + A2 batch invalidate, gated on Stage-1 measurement
- [ ] 1028-06-PLAN.md — Wave 5: Phase wrap — finalize VERIFICATION.md, update ROADMAP.md + STATE.md

> Plans 02-06 are serialized: each Wave-N plan extends the SensorThreshold MEX block in `libs/FastSense/build_mex.m`, appends measurements to `bench_tag_pipeline_1k.m`, and writes a new subsection to `1028-VERIFICATION.md`. The serial chain prevents shared-file conflicts and naturally flows each plan's `tickMin` into the next plan's Δ-vs-previous table.

## Backlog

Expand Down
24 changes: 12 additions & 12 deletions .planning/STATE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
gsd_state_version: 1.0
milestone: v3.0
milestone_name: FastSense Companion
status: shipped
last_updated: "2026-05-08T23:30:00.000Z"
last_activity: 2026-05-08 -- Quick fix 260508-od4: roll back ny6 switchPage refresh sweep (didn't fix stuck-widget symptom, added per-tab cost) + guard HoverCrosshair.onFigureMove_ against invalid-object errors after panel teardown (OD4-01/02)
milestone: v1.0
milestone_name: milestone
status: executing
last_updated: "2026-05-08T16:30:00.000Z"
last_activity: 2026-05-08
progress:
total_phases: 6
completed_phases: 2
total_plans: 13
completed_plans: 13
completed_phases: 0
total_plans: 6
completed_plans: 3
---

# State

## Current Position

Phase: 1028
Plan: Not started
Phase: 1028 (tag-update-perf-mex-simd) — EXECUTING
Plan: 3 of 6 (Plans 01 + 02 + 02b + 02d complete; 02b/02d are mid-phase Wave-1.5 insertions for measurement gap and .mat read-side cache)
Milestone: v3.0 FastSense Companion — SHIPPED 2026-04-30
Status: Awaiting next milestone (run `/gsd:new-milestone` to scope v3.x or v4.0)
Last activity: 2026-05-08 -- Quick fix 260508-od4 (936feac): roll back ny6 + guard HoverCrosshair.onFigureMove_ against invalid-object errors after panel teardown
Status: Ready to execute Plan 03 — see VERIFICATION.md for strategic implication on K2/K3/K4/K5 scoping (cache landed; Plan 05 H8/H9 trigger reassessment pending CI data)
Last activity: 2026-05-08 — Plan 02d in-memory prior-state cache shipped (skips per-tick load() in writeTagMat_('append',...))

### Quick Tasks Completed

Expand Down
Loading
Loading