Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

10.2 KB
Raw Blame
{
  "description": "Retrieval guard questions over tests/fixtures/sample_repo. Gold files were read off the fixture source by hand, never from tool output. The fixture repeats one calculator in twelve languages, so most questions only resolve if the language or a distinctive identifier is weighed, which is what makes a 42-file repo discriminating.",
  "repo": "tests/fixtures/sample_repo",
  "questions": [
    {"id": "issue-go-divide-zero", "shape": "issue", "query": "Divide in the Go service returns an error when the divisor is zero, where is that check?", "gold": ["go_pkg/calculator/calculator.go"], "basis": "Calculator.Divide returns ErrDivisionByZero when ops.Y == 0"},
    {"id": "issue-go-add-main", "shape": "issue", "query": "Add returns the wrong sum when main calls the Go calculator", "gold": ["go_pkg/calculator/calculator.go", "go_pkg/main.go"], "basis": "main() calls calc.Add; Calculator.Add is defined in calculator.go"},
    {"id": "issue-go-history-copy", "shape": "issue", "query": "History returns a copy of the records but ClearHistory reuses the slice in the Go calculator", "gold": ["go_pkg/calculator/calculator.go"], "basis": "History and ClearHistory methods on the Go Calculator"},
    {"id": "issue-go-new-empty", "shape": "issue", "query": "New returns a Calculator with an empty history in the Go package", "gold": ["go_pkg/calculator/calculator.go"], "basis": "func New() *Calculator"},
    {"id": "issue-go-runoperation", "shape": "issue", "query": "RunOperation reports unknown operation for a valid operation name", "gold": ["go_pkg/main.go"], "basis": "RunOperation switch with the unknown operation default"},
    {"id": "issue-go-summary-format", "shape": "issue", "query": "Summary on a Go CalculationRecord is formatted with two decimals when the calculator records an operation", "gold": ["go_pkg/calculator/calculator.go", "go_pkg/types/types.go"], "basis": "record() builds Summary with Sprintf; CalculationRecord is declared in types.go"},
    {"id": "issue-py-clear-history", "shape": "issue", "query": "Clear does not reset the history of the Python Calculator", "gold": ["python_pkg/calculator.py", "python_pkg/models.py"], "basis": "Calculator.clear_history calls CalculationHistory.clear"},
    {"id": "issue-py-last-none", "shape": "issue", "query": "Last returns None when the Python calculation history is empty", "gold": ["python_pkg/models.py"], "basis": "CalculationHistory.last returns None on empty entries"},
    {"id": "issue-ts-validate-divide", "shape": "issue", "query": "Calculate rejects a divide request with y equal to zero before sending it", "gold": ["typescript_pkg/src/client.ts", "typescript_pkg/src/utils.ts"], "basis": "ApiClient.calculate calls validateRequest, which rejects divide by zero"},
    {"id": "issue-ts-healthcheck", "shape": "issue", "query": "HealthCheck returns false when the API server is down", "gold": ["typescript_pkg/src/client.ts"], "basis": "ApiClient.healthCheck catches and returns false"},
    {"id": "issue-java-divide", "shape": "issue", "query": "The Java Calculator throws ArithmeticException when dividing by zero", "gold": ["java_pkg/Calculator.java"], "basis": "Calculator.divide throws ArithmeticException"},
    {"id": "issue-kotlin-history", "shape": "issue", "query": "Kotlin Calculator getHistory exposes the mutable history list", "gold": ["kotlin_pkg/Calculator.kt"], "basis": "fun getHistory(): List<CalculationRecord> = history"},
    {"id": "issue-cpp-divide", "shape": "issue", "query": "The C++ Calculator divide throws invalid_argument when the divisor is zero", "gold": ["cpp_pkg/calculator.cpp", "cpp_pkg/calculator.hpp"], "basis": "Calculator::divide throws std::invalid_argument; declared in calculator.hpp"},
    {"id": "issue-ruby-record", "shape": "issue", "query": "Ruby Calculator record appends a CalculationRecord to the history", "gold": ["ruby_pkg/calculator.rb", "ruby_pkg/models.rb"], "basis": "record pushes CalculationRecord.new; CalculationRecord is in models.rb"},
    {"id": "ident-errdivisionbyzero", "shape": "identifier", "query": "ErrDivisionByZero", "gold": ["go_pkg/calculator/calculator.go"], "basis": "var ErrDivisionByZero"},
    {"id": "ident-operands", "shape": "identifier", "query": "Operands", "gold": ["go_pkg/types/types.go"], "basis": "type Operands struct"},
    {"id": "ident-arithmetic", "shape": "identifier", "query": "Arithmetic", "gold": ["go_pkg/types/types.go"], "basis": "type Arithmetic interface"},
    {"id": "ident-divisionbyzeroerror", "shape": "identifier", "query": "DivisionByZeroError", "gold": ["python_pkg/calculator.py"], "basis": "class DivisionByZeroError(ArithmeticError)"},
    {"id": "ident-is-close-to-zero", "shape": "identifier", "query": "is_close_to_zero", "gold": ["python_pkg/utils.py"], "basis": "def is_close_to_zero"},
    {"id": "ident-round-result", "shape": "identifier", "query": "round_result", "gold": ["python_pkg/utils.py"], "basis": "def round_result"},
    {"id": "ident-safe-sqrt", "shape": "identifier", "query": "safe_sqrt", "gold": ["python_pkg/utils.py"], "basis": "def safe_sqrt"},
    {"id": "ident-format-number", "shape": "identifier", "query": "format_number", "gold": ["python_pkg/utils.py"], "basis": "def format_number"},
    {"id": "ident-formatnumber", "shape": "identifier", "query": "formatNumber", "gold": ["typescript_pkg/src/utils.ts"], "basis": "export function formatNumber"},
    {"id": "ident-validaterequest", "shape": "identifier", "query": "validateRequest", "gold": ["typescript_pkg/src/utils.ts"], "basis": "export function validateRequest"},
    {"id": "ident-parseapierror", "shape": "identifier", "query": "parseApiError", "gold": ["typescript_pkg/src/utils.ts"], "basis": "export function parseApiError"},
    {"id": "ident-apiclienterror", "shape": "identifier", "query": "ApiClientError", "gold": ["typescript_pkg/src/client.ts"], "basis": "export class ApiClientError"},
    {"id": "ident-calculatorerror", "shape": "identifier", "query": "CalculatorError", "gold": ["rust_pkg/src/calculator.rs"], "basis": "pub enum CalculatorError"},
    {"id": "ident-operation-name", "shape": "identifier", "query": "operation_name", "gold": ["cpp_pkg/models.hpp"], "basis": "inline std::string operation_name"},
    {"id": "ident-orphaned-function", "shape": "identifier", "query": "orphaned_function", "gold": ["dead/unreachable_module.py"], "basis": "def orphaned_function"},
    {"id": "ident-unused-helper", "shape": "identifier", "query": "unused_helper", "gold": ["utils/helpers.py"], "basis": "def unused_helper"},
    {"id": "ident-calculationhistory", "shape": "identifier", "query": "CalculationHistory", "gold": ["python_pkg/models.py", "typescript_pkg/src/types.ts", "api/openapi.yaml"], "basis": "dataclass in models.py, interface in types.ts, schema in openapi.yaml"},
    {"id": "path-go-main", "shape": "path", "query": "go_pkg/main.go", "gold": ["go_pkg/main.go"], "basis": "the path itself"},
    {"id": "path-ts-client", "shape": "path", "query": "typescript_pkg/src/client.ts", "gold": ["typescript_pkg/src/client.ts"], "basis": "the path itself"},
    {"id": "path-rust-models", "shape": "path", "query": "rust_pkg/src/models.rs", "gold": ["rust_pkg/src/models.rs"], "basis": "the path itself"},
    {"id": "path-py-models", "shape": "path", "query": "python_pkg/models.py", "gold": ["python_pkg/models.py"], "basis": "the path itself"},
    {"id": "path-java-operation", "shape": "path", "query": "java_pkg/Operation.java", "gold": ["java_pkg/Operation.java"], "basis": "the path itself"},
    {"id": "path-openapi", "shape": "path", "query": "api/openapi.yaml", "gold": ["api/openapi.yaml"], "basis": "the path itself"},
    {"id": "concept-ts-timeout", "shape": "concept", "query": "How does the TypeScript API client time out slow requests?", "gold": ["typescript_pkg/src/client.ts"], "basis": "request() uses AbortController with timeoutMs"},
    {"id": "concept-auth-header", "shape": "concept", "query": "How is the Authorization header built from the API key?", "gold": ["typescript_pkg/src/utils.ts"], "basis": "buildHeaders sets Authorization: Bearer"},
    {"id": "concept-py-float-artifacts", "shape": "concept", "query": "How does the Python calculator avoid floating point representation artifacts in results?", "gold": ["python_pkg/utils.py", "python_pkg/calculator.py"], "basis": "round_result in utils.py, applied by every operation in calculator.py"},
    {"id": "concept-py-history-record", "shape": "concept", "query": "How does the Python Calculator record each operation in its history?", "gold": ["python_pkg/calculator.py", "python_pkg/models.py"], "basis": "methods append CalculationResult to CalculationHistory"},
    {"id": "concept-endpoints", "shape": "concept", "query": "Which HTTP endpoints does the calculator API specification expose?", "gold": ["api/openapi.yaml"], "basis": "paths /calculate, /history, /health"},
    {"id": "concept-docker", "shape": "concept", "query": "How is the container image built for the Go binary and the Python runtime?", "gold": ["Dockerfile"], "basis": "two-stage Dockerfile"},
    {"id": "concept-rust-summary", "shape": "concept", "query": "How does the Rust calculator format a calculation record summary?", "gold": ["rust_pkg/src/models.rs"], "basis": "CalculationRecord::summary formats with two decimals"},
    {"id": "concept-java-labels", "shape": "concept", "query": "Where are the lowercase labels for the Java operations defined?", "gold": ["java_pkg/Operation.java"], "basis": "Operation enum with label and getLabel"},
    {"id": "multi-jvm-operation-enum", "shape": "multi_file", "query": "Which files define the Operation type for the JVM languages Java, Kotlin and Scala?", "gold": ["java_pkg/Operation.java", "kotlin_pkg/Models.kt", "scala_pkg/Models.scala"], "basis": "enum Operation in Java, enum class in Kotlin, sealed trait in Scala"},
    {"id": "multi-computable", "shape": "multi_file", "query": "Where is the Computable interface declared and implemented in the PHP package?", "gold": ["php_pkg/Calculator.php", "php_pkg/Models.php"], "basis": "interface Computable in Models.php, implemented by Calculator in Calculator.php"},
    {"id": "multi-swift-computable", "shape": "multi_file", "query": "Which Swift files declare the Computable protocol and the Calculator that conforms to it?", "gold": ["swift_pkg/Models.swift", "swift_pkg/Calculator.swift"], "basis": "protocol Computable in Models.swift; class Calculator: Computable"}
  ]
}