Skip to content

perf: add semantic-axis comparative performance evidence #195

Closed

Description

@Sinity

Parent

Part of #330 and deployment-readiness tracker #329.

Context

Heavy archive operations previously showed high peaks:

Operation Wall time Peak RSS
Full rebuild 56m 40s 6.9 GiB
Parse rerun 20m 54s 5.35 GiB

The old target used absolute RSS thresholds. That is not the right proof model. Absolute performance targets are machine-dependent across desktop, VM, CI, and future hardware. Hard RSS/time stops remain useful only as runaway safety rails.

Scope

Build performance claims over semantic complexity signatures and comparative evidence.

Examples:

parse_chatgpt: linear in messages
get_conversation_by_id: indexed lookup in conversations
cross_provider_query: near-constant in providers, linear in result rows

Evidence should show:

  • semantic axis swept: messages, conversations, providers, blocks/message, attachment count, sidecar count;
  • candidate vs baseline comparison;
  • curve shape and inflection points;
  • stage attribution when available;
  • environment/toolchain trust metadata;
  • safety-stop failures when runaway behavior occurs.

Acceptance criteria

  • At least one heavy operation has a repeatable semantic-axis performance evidence command or runner.
  • Output includes baseline vs candidate or multiple generated scale tiers.
  • Evidence records environment/toolchain details in EvidenceEnvelope.trust.
  • The result distinguishes growth shape from machine-specific absolute numbers.
  • A regression can be expressed as "changed growth behavior" or "regressed against comparable baseline," not only "exceeded budget."

Activity

  1. changed the title [-]perf: investigate and reduce memory pressure on heavy archive operations[/-] [+]perf: characterize performance with comparative growth evidence[/+] on Apr 21, 2026
  2. added
    theme:verifiability
    theme:agent-workflow
    phase:migration
    on Apr 21, 2026
  3. changed the title [-]perf: characterize performance with comparative growth evidence[/-] [+]perf: add semantic-axis comparative performance evidence[/+] on Apr 22, 2026
  4. added
    theme:semantic-proof
    on Apr 22, 2026
  5. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Checkpoint from feature/perf/semantic-axis-evidence at caa56052.

    Implemented devtools semantic-axis-evidence as a proof-envelope wrapper over existing synthetic benchmark campaigns.

    What this adds:

    • repeatable command for semantic-axis performance evidence, defaulting to fts-rebuild over the messages axis
    • multiple generated scale tiers via --scales, defaulting to small medium
    • growth-shape evidence: adjacent axis/metric ratios, elasticity, and shape classification
    • optional --baseline comparison that can express regressions as changed growth behavior
    • EvidenceEnvelope.trust metadata with code revision, dirty state, schema version, input/environment fingerprints, runner version, and origin
    • command catalog/docs registration plus unit coverage for evidence math, baseline counterexamples, JSON serializability, and CLI reproducer shape

    End-to-end evidence check run:

    • devtools semantic-axis-evidence --campaign fts-rebuild --axis messages --scales small medium --output .local/performance-evidence/issue-195 --no-save
    • result: status=ok, growth_shape=approximately-linear, axis_db_stat=messages_count, metric=rebuild_wall_s

    Verification:

    • pytest tests/unit/devtools/test_semantic_axis_evidence.py -q — 5 passed
    • pytest tests/unit/devtools/test_command_catalog.py -q — 4 passed
    • mypy devtools/semantic_axis_evidence.py tests/unit/devtools/test_semantic_axis_evidence.py — clean
    • devtools render-all --check — clean
    • devtools verify — all checks passed
  6. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Completed in PR #349, merged as a0efd2c5e2008f2b9fca4d28c50965502d7eaf91.

    What landed:

    • devtools semantic-axis-evidence for repeatable semantic-axis performance evidence over synthetic benchmark tiers.
    • fts-rebuild over the messages axis now has an operator-facing command that emits EvidenceEnvelope JSON.
    • Evidence includes generated scale tiers, adjacent growth ratios, elasticity, growth-shape classification, baseline-comparison semantics, and EvidenceEnvelope.trust metadata.
    • Regression language is now expressible as changed growth behavior against a prior evidence envelope, not only absolute time/RSS thresholds.

    Verification before merge:

    • focused unit tests passed
    • command-catalog tests passed
    • end-to-end devtools semantic-axis-evidence --campaign fts-rebuild --axis messages --scales small medium --output .local/performance-evidence/issue-195 --no-save emitted status=ok, growth_shape=approximately-linear
    • mypy on touched files passed
    • devtools render-all --check passed
    • devtools verify passed
    • pre-push quick verify passed
    • remote lint, typecheck, Nix, showcase, PR policy, CodeRabbit, and GitGuardian were green before merge; Python matrix and CodeQL were still pending under the known quota caveat.
  7. added 4 commits that reference this issue on Apr 22, 2026
    dd06d91
    4618f8a
    ea2edc8
    2f24c15
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

    area:pipelinearea:qaarea:storagephase:migrationtheme:agent-workflowtheme:semantic-prooftheme:verifiabilitytype:perf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions