Skip to content

Preserve leading declaration comments in bounded symbol search documents #2372

Description

@TheGreenCedar

Outcome

A user investigating configuration values should be able to locate an indexed function whose declaration comment explicitly describes the value being searched. On pinned Terragrunt U04-C01, a public full-retrieval search for TF_VAR omits SetTerragruntInputsAsEnvVars and ToTerraformEnvVars, forcing ordinary source search to discover the configuration-to-Terraform handoff.

Reproduction and cause

Unpublished c3a5 full-retrieval public search completed with ten other rows and no gaps; internal/runner/run/run.go is indexed and complete. Its exported function comments contain TF_VAR at lines 491 and 714. Frozen core symbol_search_doc rows for the two functions omit it. Runtime semantic projection retains at most four nearest preceding comment lines and spends its 48-token source allocation on signature/body before comments. The lexical sidecar indexes the resulting document verbatim.

Retained development receipts:

  • /Users/albert/.codex/evidence/codestory-0176-codex-recovery/terragrunt-u04-c01-public-search-devc3a5-03/run-receipt.json
  • /Users/albert/.codex/evidence/codestory-0176-codex-recovery/terragrunt-u04-c01-current-public-route-devc3a5-02/packet-output.json
  • /Users/albert/.codex/evidence/codestory-0176-codex-recovery/terragrunt-u04-c01-installed-adaptive-devc3a5-01/root-source-baseline-2026-09-23.md

Scope and acceptance

Repair the existing bounded symbol-document construction in codestory-runtime; do not add Terragrunt- or question-specific selectors, increase public confidence of diagnostic repo-text hits, or change the public schema. Cover a leading term in a multi-line declaration comment, bounded source/total tokens, retained identity/signature, deterministic document order and affected publication failure boundaries. Obtain independent exact-patch review and verify that an affected public search can locate useful evidence on a newly built candidate. A symbol-doc repair alone does not prove a complete adaptive answer or comparative gain.

Owner: root Sol 6 integrates and supervises; separate Sol 6 implements in an isolated worktree; independent Sol 6 challenger reviews. Base c3a5a7378ecdf57440312e433aaf2df8a8e21dc9. Refs #2173 and #2135.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions