Decide compute_domain_hint field-projector contract (re-add vs dot-path predicates vs per-blade flatteners) #3
Labels
No labels
bug
devfu
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stallari/mcp-helpers#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrated from the vault DEVFU register by the DD-422 sweep (frozen-index entry [238], DEVFU-2026-05-24-stallari-mcp-helpers-field-projector-gap).
Context (register entry, verbatim)
DEVFU-2026-05-24-stallari-mcp-helpers-field-projector-gap — DD-338 Phase E.python Spec A redesigned
compute_domain_hint's public API as 2-arg(record, patterns)with dot-path navigation built-in, dropping thefield_projector: Callablecallable that all 5 pre-consolidation blade copies carried. The gmail Spec B coding subagent discovered this is a real contract gap: gmail's record shape (payload.headers[name=From].value) has a list-with-predicate-then-field path that is NOT dot-path-addressable. Subagent's fix: keep gmail's local_gmail_field_projector+ add a_flatten_gmail_record()helper that pre-projects records into a flat dict before passing to canonicalcompute_domain_hint. Verified all 4 other blades withdomain_hint.py(ha, mastodon, tailscale, syncthing) ALSO carry their own_field_projectorcallables — likely will converge on the same_flatten_*_recordpattern. The architectural question: should the canonical lib (a) re-addfield_projectorto the API as v0.2.0 (3-arg signature; pre-flatten approach moves back into the lib), (b) add native list-with-predicate dot-path syntax likeheaders[name=From].value(more expressive; more lib code), or (c) accept per-blade flatten helpers as the right boundary (blade-specific record shape stays per-blade; canonical lib stays minimal). Fix shape (decision-required): decide a/b/c after observing what the 3 in-flight Spec B clusters converge on. If all 4 blades use_flatten_*_recordcleanly, (c) is the right call. If any blade resorts to ugly workarounds or duplicate logic, reconsider (a) or (b). Effort: architect 1h decision + (if a/b) ~2h lib + helper-package minor bump + 5-blade follow-up flip to remove_flatten_*_recordhelpers. Related: DD-338 Phase E.python; gmail PR h…Acceptance criteria
field_projectoras 3-arg API / (b) native list-with-predicate dot-path syntax (headers[name=From].value) / (c) accept per-blade_flatten_*_recordhelpers — recorded after auditing what the Spec B blade clusters (gmail, ha, mastodon, tailscale, syncthing) converged on_flatten_*_recordhelpersBlocked by
None - can start immediately
Decision brief (AI triage, 2026-07-16) — the convergence evidence is now in, and it did NOT converge on (c).
Current state across the 5 blades (checked live in local checkouts):
_flatten_gmail_record()pre-flatten + local_gmail_field_projector(the (c) pattern).compute_domain_hint(rec, _PATTERNS, _field_projector)— a 3-arg call, i.e. a local/duplicatecompute_domain_hint, not the canonical 2-arg lib.field_projector=default parameter in its own wrapper (_tailscale_field_projector)._field_projectorclosure-captured.That's 4 of 5 blades carrying duplicate projector logic — the "ugly workarounds or duplicate logic" trigger the issue named for reconsidering (a).
Lean: (a) — re-add
field_projectoras an optional 3rd argument in stallari-mcp-helpers v0.2.0 (default = built-in dot-path, so syncthing-style callers are untouched), then delete the per-blade copies in a follow-up sweep. (b) list-predicate dot-path syntax is more lib for one gmail-shaped case; (c) is empirically not what the blades did.Your move: confirm (a) and I'll queue the v0.2.0 change + the 4-blade cleanup sweep as agent work.