Skip to content

Perf: profile and reduce boundary/gate latency in small governed runs #2891

Description

@alonf

Summary

The 0.39.0 beta dogfood shows the full Specrew lifecycle is usable even for small examples, but boundary and gate processing remains noticeably slow. The quality bar is worth keeping; the follow-up is to profile and reduce unnecessary latency.

Evidence

Dogfood on the Win32 Button subclass sample completed autonomously and produced higher-quality artifacts, but the user-visible process included slow gate/preflight/sync cycles. The user accepted the overhead for beta, with profiling planned later.

Scope

Profile, then optimize. Do not lower governance quality or skip human-judgment boundaries to make the run faster.

Likely areas:

  • Governance validation repeated full-repo scans.
  • Boundary sync and pending-verdict packet generation.
  • Stop-provider transcript/state reads.
  • Repeated file artifact scans where changed-only validation would suffice.

Acceptance Criteria

  • Add timing evidence for the major gate steps on a representative small feature.
  • Identify the top latency contributors with measured before/after numbers.
  • Reduce common-path latency without hiding WARN/FAIL evidence.
  • Document any remaining intentionally-expensive checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions