Skip to content

feat(spacing): tested two-gate Assisted decision model (#24)#94

Closed
AsafMah wants to merge 2 commits into
devfrom
feat/spacing-gate-model
Closed

feat(spacing): tested two-gate Assisted decision model (#24)#94
AsafMah wants to merge 2 commits into
devfrom
feat/spacing-gate-model

Conversation

@AsafMah

@AsafMah AsafMah commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Stacked on #93 (feat/spacing-signal-grace). Pure model/seam only — no behavior change.

What

Adds the tested decision model for the spacing-policy Assisted tier:

  • SpacingGateModel with explicit gate states (OFF, NONE, INSTANT, PAUSE)
  • SpacingGateDecision trace carrier
  • low-threshold setting on the Two-thumb screen (PREF_SPACING_ASSISTED_LOW_THRESHOLD, default conservative)
  • InputLogic evaluates and stores mLastSpacingGateDecision only when the Assisted tier is enabled; nothing consumes it yet.

This gives the upcoming A11 readout / trace-recorder / gate behavior one shared data shape.

Verification

SpacingGateModelTest + SettingsContainerTestBUILD SUCCESSFUL.

Next

Integrate with the A11 spacing insight readout so the live overlay can display complete, prefixRichScore, resolved gate (INSTANT/PAUSE/NONE), then wire behavior in the follow-up.

AsafMah added 2 commits June 11, 2026 09:21
Phase 2 of the spacing-policy epic (#14). The combining grace-timer duration
now adapts to the #92 word-state signals instead of a fixed value:

  graceMs = clamp(base - completeBonus*complete + prefixPenalty*prefixRichScore,
                  100, 3000)

A finished dictionary word commits sooner; an extendable prefix-rich stem waits
longer. Wired into enterCombiningMode behind the default-off experimental flag
PREF_SPACING_SIGNAL_DRIVEN_GRACE; the formula is a pure static helper
(signalDrivenGraceMs) for testability.

Live tuning knobs (#26), all experimental on the Two-thumb screen:
- PREF_SPACING_SIGNAL_DRIVEN_GRACE (toggle, default off)
- PREF_SPACING_COMPLETE_BONUS_MS (slider, default 200)
- PREF_SPACING_PREFIX_PENALTY_MS (slider, default 400)
base = the existing PREF_COMBINING_GRACE_MS; min/max clamp hardcoded.

Verify: SpacingSignalsTest (+6 graceMs cases) / SettingsContainerTest /
InputLogicTest -> 128 completed, 3 failed (pre-existing baseline), 1 skipped;
0 new failures. Feel/tuning is on-device.
Adds the pure decision model for the spacing-policy Assisted tier:
- OFF / NONE / INSTANT / PAUSE gate states
- low-threshold setting for instant vs pause decisions
- typed-word signals are evaluated into a trace carrier in InputLogic when the
  Assisted tier is enabled, but not yet consumed by enterCombiningMode

This is intentionally no behavior change: it stores the last decision for the
upcoming A11/readout and recorder paths; the actual commit behavior integrates
in the next increment.

Verification: SpacingGateModelTest + SettingsContainerTest -> BUILD SUCCESSFUL.
@AsafMah

AsafMah commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Parking with #93. The pure decision model is technically safe, but it was designed to feed the adaptive/Assisted timer stack. Since #93 is being parked, this should be rethought before merge rather than landing unused settings/model complexity.

If revived later, use the #94 implementation as a reference, but re-scope it around the actual surfaces (tap-only protected; swipes resolve to words; multipart/tap-then-swipe likely matters most).

@AsafMah AsafMah closed this Jun 12, 2026
@AsafMah AsafMah deleted the feat/spacing-gate-model branch June 12, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant