Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

core: correct the embedding contract cancellation-window explanation

Open Beginner friendly
#1,944 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start with the explanatory comment above the constants at lines 51-59 of packages/core/src/testing/embeddings.ts, then read runEmbeddingProviderContract (lines 70-142) to see how the live-signal and early/late abort checks use separate query invocations. Correct the comment's ordering claim so it separates the 1000ms live-signal observation from the 50/700ms pending-query bounds and the 400ms post-abort allowances, and check nearby docs for the same claim. Done means the comment matches the code, the executable diff is empty, and any source citations are updated in the same change.

Written by the indexing model from the issue text.

Description

agent-ready area: core type: docs

Out of scope

Changing published contract timing, provider behavior, schemas, runtime assertions or fixture scheduling; changing the private-clock implementation in #1942.

Context

Source review during #1855/#1942 found an inaccurate explanation in the published embedding contract helper at inspected main 58f572c4d2f86fe55d76ff053fb315b83e549158.

UNCANCELLED_MS is 1000 (packages/core/src/testing/embeddings.ts:51), ABORT_AFTER_MS is [50, 700] (packages/core/src/testing/embeddings.ts:53), and REJECT_WITHIN_MS is 400 (packages/core/src/testing/embeddings.ts:59). The comment at lines54–58 says the late abort window opens after UNCANCELLED_MS; for a still-pending query its nominal start is700, before1000. The nominal post-abort windows end at450 and1100. A query that settles before its initial observation bound can return from settleWithin earlier; the constants are not a claim that every malformed query reaches those nominal abort times. The live-signal observation and the early/late abort checks use separate query invocations (runEmbeddingProviderContract, packages/core/src/testing/embeddings.ts:70-142).

This is a source-comment accuracy issue, not evidence that the current contract oracle is broken. It is supporting documentation work outside the test-cost epic's delivery scope.

Scope

Correct the explanation to match the current independent live-signal and cancellation observations. Check nearby documentation for the same incorrect ordering claim.

Acceptance criteria

  • The comment accurately distinguishes the1000ms live-signal observation from the50/700ms nominal pending-query observation bounds and400ms post-abort allowances.
  • It does not claim700 is later than1000 or imply all observations share one query timeline.
  • All constants, executable statements, exported types, native caller tests and expected malformed-provider outcomes remain unchanged.
  • Any affected source citations are reconciled in the same change.

Verification

Review the comment against the actual constants and control flow. Verify the executable diff is empty and run the required focused preflight/citation checks. This comment correction needs no new test or expensive behavior rerun solely to prove wording.

Contract impact

None. The published timing and runtime behavior remain unchanged.

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
5h 38m
Merged PRs (30d)
960

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from schlessera/brain-kit

All issues in schlessera/brain-kit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.