Skip to main content

Module similar_code

Module similar_code 

Source
Expand description

Pure, bounded evaluation of provider-supplied code vectors.

This prototype deliberately owns no extraction, model, network, subprocess, or public output behavior. Orchestration validates provider consent and then passes vectors into this deterministic layer.

Structs§

FunctionLocation
Complete location of one function in UTF-8 source text.
FunctionVector
One extracted function and its provider-supplied vector.
SimilarCodeCandidate
One advisory similar-code pair.
SimilarCodeCompletion
Machine-readable completion evidence for one run.
SimilarCodeCorpusSelection
Deterministic bounded corpus chosen before provider inference.
SimilarCodeEvaluation
Results and boundedness evidence for one candidate-evaluation run.
SimilarCodeLimits
Hard limits for one candidate-evaluation run.
SimilarCodeSelectionInput
Source identity available before provider inference.
SimilarCodeSkip
Omitted-work count for one stable reason.
SimilarCodeSourceDigest
Full SHA-256 digest of one exact extracted function source fragment.
SimilarCodeVectorCache
Separate FIFO cache with a bounded vector-payload budget.
VectorCacheKey
Identity for one vector-cache entry.

Enums§

SimilarCodeCompletionStatus
Whether all eligible work within the supplied corpus was evaluated.
SimilarCodeError
Invalid input rejected before candidate output is produced.
SimilarCodeSkipReason
Why an evaluation omitted otherwise eligible work.
SimilarCodeVerificationStatus
Candidate verification state.

Constants§

EXTRACTION_SEMANTICS_VERSION
Extraction semantics understood by the first similar-code source contract.

Functions§

evaluate_selected_similar_code
Evaluate only the vectors produced for a prior source-corpus selection.
evaluate_similar_code
Evaluate provider-supplied vectors with bounded brute-force cosine search.
select_similar_code_corpus
Select a deterministic fair corpus before provider inference.
validate_function_vectors
Validate vectors without generating pair candidates.