Skip to content

feat(spec, plugin-email): IEmailService.isConfigured() answers whether mail is delivered - #25125

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-25065-email-transport-live
Oct 21, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-25065-email-transport-live

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Closes #25065
Clause-②: yes (widening: an optional member on IEmailService)
Metadata-protocol: none

What

Tests (final head 1fe7845d18)

  • pnpm --filter @objectstack/plugin-email test: 36 files / 649 tests passed. typecheck (tsc + test typecheck) exit 0.
  • New plugin-email cases: log transport gives false; live transport gives true; runtime swap log to live to log; registered plugin service on the default boot gives false; saving SMTP settings turns it true; swapping SMTP to Resend stays true.
  • Spec: src/contracts/email-service.test.ts passes 6/6. The type test pins that the member is optional (an implementation without it stays assignable), and uses @ts-expect-error on a non-boolean answer. typecheck, including check:test-typecheck, exits 0, so that directive is compiled. test:repo: 72 files / 1237 tests passed.
  • pnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date against a freshly built dist. No baseline moved, so the api-surface snapshot does not record interface members.
  • Ablation: scripts/ablation-replace.mjs on the isConfigured body. The subject is imported from src through relative paths, so there is no dist leg. Leg 1 (return true) and leg 2 (return false) each ran with the marker on disk (1 hit, anchor 0 hits). Each turned 4 of the new tests red (2 files failed, 4 failed / 50 passed). Both restores were verified: blob equals the HEAD blob 279f67336b27 and git diff HEAD is empty.
  • node scripts/pm/dispatch-gates.mjs --commands (90 commands, plus the 5 roster families under touched directories) all exited 0. The changeset gates were re-run after the regrade commit.

Acceptance notes

  • The CI-only families that dispatch-gates names (shard attestations, type-check workspace lanes, Build Core) were not measured locally. CI runs them.

Generated by Claude Code

…r mail is delivered

Adds an optional isConfigured(): boolean member to IEmailService, shaped
like ISmsService.isConfigured(). plugin-email's EmailService answers false
while its transport is the LogTransport and true otherwise, read from the
live transport so it follows runtime swaps from the mail settings.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
…-protocol none

IEmailService is a service contract, not authorable metadata, so under the
level rule now on main the entry declares Metadata-protocol: none and ships
patch for both packages; the Clause-2 widening line stays as claimed.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-email, @objectstack/spec, touching 3 documentable anchor(s).

4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via IEmailService (symbol, a top-level interface))
  • content/docs/kernel/contracts/index.mdx (via IEmailService (symbol, a top-level interface))
  • content/docs/kernel/runtime-services/sms-service.mdx (via isConfigured (symbol, a method of class EmailService; a method of interface IEmailService))
  • content/docs/protocol/kernel/plugin-spec.mdx (via EmailService (symbol, a top-level class))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-1.mdx (via IEmailService (symbol, a top-level interface))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 145 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 03966ceae096f75c73c8fada48c828b86f86e02a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from dd6f57d16e05308826b417b96148676e5587d956 — the merge of head 1fe7845d183a573acf5b188889f3f3c2791baf05 into base 03966ceae096f75c73c8fada48c828b86f86e02a, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin dd6f57d16e05308826b417b96148676e5587d956 && git checkout dd6f57d16e05308826b417b96148676e5587d956
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 03966ceae096f75c73c8fada48c828b86f86e02a 1fe7845d183a573acf5b188889f3f3c2791baf05 && git checkout -B drift-repro 03966ceae096f75c73c8fada48c828b86f86e02a && git merge --no-ff 1fe7845d183a573acf5b188889f3f3c2791baf05

node scripts/docs-audit/affected-docs.mjs --json 03966ceae096f75c73c8fada48c828b86f86e02a

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 03966ceae096f75c73c8fada48c828b86f86e02a → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1fe7845d183a573acf5b188889f3f3c2791baf05
Local-runs: none
Scope: packages/spec/src/contracts/email-service.ts, packages/spec/src/contracts/email-service.test.ts, packages/plugins/plugin-email/src/email-service.ts, packages/plugins/plugin-email/src/email-service.test.ts, packages/plugins/plugin-email/src/email-plugin.mail-settings.test.ts + .changeset/25065-email-service-is-configured.md

① Derived judgments

  • The contract. IEmailService.isConfigured?(): boolean (email-service.ts:340-365) has the same name and zero-argument boolean shape as ISmsService.isConfigured() (sms-service.ts:118), and it is optional as the claim asked.
  • Implementers. The only in-repo implementer is plugin-email's EmailService (plugin-email/src/email-service.ts:602), and it answers the member. Every other reference is a consumer or a structural mock, and all of them stay assignable.
  • The answer is read live. It reads this.options.transport on each call (:664-666), and setTransport (:653-655) mutates that same object.
  • Only LogTransport answers false, and no non-delivering state can answer true:
    • makeTransport throws instead of degrading;
    • boot propagates the throw (email-plugin.ts:437-449);
    • every failure branch of the settings swap keeps the previous transport, and only a successfully built SMTP or API transport is installed (:1332, :1386).
  • The settings action agrees. The mail/test action already uses the same instanceof LogTransport predicate (:747).
  • The tests are real. Each ablation leg reds exactly the four assertions of the opposite value, and the @ts-expect-error type test compiles under check:test-typecheck.

② Semver level

Clause-②: yes (widening): an optional member on a published interface. Metadata-protocol: none: IEmailService is a service contract, not an authorable key, value, type or default, and no authorable-surface/ or authorable-defaults/ shard moves. Under AGENTS.md item 3 as amended by ruling A (#25105 / PR #25114), a non-protocol widening ships patch, so patch on both packages is the mandated level. The head's check-changeset-no-major.mjs reports LEVEL AXIS ✓ against the PR body.

③ Boundary flags

Implemented-by: claude/issue-25065-email-transport-live
Reviewed-by: session_01D6F9axfoPzR7t8G1J7Ytzz

VERDICT: PASS

Seat re-read of the check-runs at landing: all 42 runs on 1fe7845d18 have completed: 35 succeeded, the rest were skipped, and none is red.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

2 participants