Skip to content

refactor(urgency): extract deadline mechanics - #379

Open
AKarode wants to merge 1 commit into
mainfrom
AKarode/stage-b-searchfilters
Open

refactor(urgency): extract deadline mechanics#379
AKarode wants to merge 1 commit into
mainfrom
AKarode/stage-b-searchfilters

Conversation

@AKarode

@AKarode AKarode commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • create internal/urgency for deterministic urgent-item mechanics
  • own Gmail actionability-label parsing, in-shelf score boosts, recency gating, deadline/negation matching, Unicode-safe deadline-centered snippets, and connector envelope stripping
  • move five focused tests and add two direct helper/surface tests
  • retain human-sender and occurred-time derivation plus shelf assembly, salience tie-breaking, caps, and brief budgeting in Mora

Closes part of #320.

Boundary and behavior

The 48-hour gate, label weights, ordered phrase vocabulary, word boundaries, immediate negators, snippet lead/default length, From-line removal, Unicode rune indexing, and exact clipping/ellipsis behavior remain unchanged. Mora still uses the shared identity classifier/person resolution to supply the human gate; service/no-sender/stale and full brief integration tests remain above the package.

Evidence

  • repository tests: 2,306 → 2,308 (five moved, two added)
  • Mora Test funcs: 1,758 → 1,753
  • full race suite: 292.45s (prior 291.01s)
  • Mora race package: 277.698s
  • internal/urgency race coverage: 96.9%

Validation

  • CGO_ENABLED=0 go build ./...
  • go vet ./...
  • golangci-lint run ./... ✅ (0 issues)
  • full -race -count=1 suite ✅
  • focused urgency/brief/T0/T2 gates ✅
  • Windows test compile for internal/urgency and internal/mora
  • git diff --check

Tier-1 is not invoked for this deterministic helper extraction; the general local harness remains blocked by the documented macOS signing identity prerequisite.

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