Skip to main content

Tests: internal/recall

internal/recall · 48 tests

Each test is named for the property it holds, and runs against a real deployment: there is no mock of the database and no arm that skips when it is absent. The sentence is the test's name read back; the name is what go test -run takes.

controls_test.go

limits_test.go

recall_test.go

surfaces_test.go

  • An unanchored question names the surfaces that did not runTestAnUnanchoredQuestionNamesTheSurfacesThatDidNotRun. With no exact anchor and no semantic surfaces, a caller who selected surfaces by name is told which did not run, rather than getting an empty answer that looks like ignorance.
  • A semantic anchor starts a walk when no name matchedTestASemanticAnchorStartsAWalkWhenNoNameMatched. A question that names nothing stored by name is anchored by meaning, and the anchor says so.
  • A thematic question with no anchor is answered from reports with sourcesTestAThematicQuestionWithNoAnchorIsAnsweredFromReportsWithSources. A thematic question with no anchor is answered from reports, each carrying its sources, and the reach still says nothing was anchored because that is still true.
  • Passages fill the remaining budget and are never factsTestPassagesFillTheRemainingBudgetAndAreNeverFacts. Passages fill what the budget has left and are never facts: a tool message's words come back as a passage with its role, and the facts list is untouched by them.
  • A refusing surface is degraded not fatalTestARefusingSurfaceIsDegradedNotFatal. A surface that refuses is named as degraded and the rest of the bundle still answers.
  • The composed surfaces share one budgetTestTheComposedSurfacesShareOneBudget. The budget is one budget: reports and passages are cut by the characters the facts left.
  • Surface controls are refused when not in the setTestSurfaceControlsAreRefusedWhenNotInTheSet. Surface names are a closed set: an unknown or repeated name is refused, and the exact path is not touched when only facts are selected and a name matched.
  • Semantic anchors are capped and stop at the capTestSemanticAnchorsAreCappedAndStopAtTheCap. A meaning match proposes at most a fixed number of places to start, however many scopes are asked: the first scope that fills the cap ends the search, so a caller with many projects does not pay one embedding query per project for anchors it will not walk.
  • A report larger than the remaining budget is cut whole and reportedTestAReportLargerThanTheRemainingBudgetIsCutWholeAndReported. A report that does not fit what the budget has left is cut whole and the cut is reported: half a report is not a smaller report, it is a different one.
  • A refusing passage surface is degraded and reports still answerTestARefusingPassageSurfaceIsDegradedAndReportsStillAnswer. The passage surface refusing is named as degraded like any other, and the reports still answer.
  • No scopes answer nothing and a repeated word is one termTestNoScopesAnswerNothingAndARepeatedWordIsOneTerm. Nothing to search is an empty answer, not an error, and a repeated word is one term: a term is a thing to look up, and looking the same thing up twice is the same lookup.
  • A subject filter reaches every surfaceTestASubjectFilterReachesEverySurface. Passages are searched for that person only; reports, which span people and name nobody as their source, are withheld and the bundle says so; and a name the semantic surface proposed that this person has no fact about is not returned, because it is somebody else's memory.
  • Deselecting facts returns no facts even when a name matchedTestDeselectingFactsReturnsNoFactsEvenWhenANameMatched. Deselecting facts deselects them even when the question named something: no walk, no anchors, no facts — and the name it matched is still counted, so the reach does not claim it named nothing.
  • A semantic anchor that answers is counted as anchoredTestASemanticAnchorThatAnswersIsCountedAsAnchored. A bundle answered through a semantic anchor counts that anchor, so it does not also report that the question named nothing this memory holds; under a subject filter the anchor stays, because that person has a fact about it.
  • A fact is never co derived with itselfTestAFactIsNeverCoDerivedWithItself. The same fact twice is one fact, never co-derived with itself.