Skip to content

Add performance audit and remediation plan#31

Open
alanshurafa wants to merge 3 commits into
masterfrom
claude/software-performance-audit-YCpSW
Open

Add performance audit and remediation plan#31
alanshurafa wants to merge 3 commits into
masterfrom
claude/software-performance-audit-YCpSW

Conversation

@alanshurafa

@alanshurafa alanshurafa commented May 29, 2026

Copy link
Copy Markdown
Owner

What this adds

  • PERFORMANCE-AUDIT.md — an evidence-based audit of co-evolution covering portability, dependency coupling, artifact drift, test/CI gaps, and the latency/cost/convergence profile. Top finding: an undetected hard dependency on mikefarah/yq disables the policy tier and the scoring harness whenever the Python yq variant is on PATH.
  • REMEDIATION-PLAN.md — the fix plan, sequenced into four PRs (Phase 1 correctness → Phase 2 test hermeticity + CI gate → Phase 3 performance → Phase 4 hygiene), each with verification steps and a rollback note.

How the plan was hardened

The plan ran through two independent adversarial reviews using the repo's own co-evolution tooling — Claude and Codex each as a separate critique pass — followed by a synthesis that merged the union of unique findings. The methodology dogfoods the tool the audit covers.

Two must-fixes surfaced and are now in the plan:

  • 3.3 early-stop hazard. A delta-based early stop that checked only for new markers could halt while inherited markers from a prior pass stayed open. The plan now requires zero live markers before an early stop, and normalizes the delta (stripping the human summary, whitespace, and code fences) so cosmetic churn neither blocks nor triggers it.
  • 2.1 hermetic-vs-production conflict. A blanket test git env risks changing how production code signs commits when a suite drives that code. The plan now scopes the hermetic env to the test-runner process and adds an explicit check that real runtime invocations still inherit the user's signing.

Smaller folds: a functional yq probe instead of version-string grepping; validator-based positive/negative fixtures behind the schema drift guard; an explicit CI-safe suite declaration with PATH stubs for claude/codex; and a corrected F-6 finding — die() ignores its exit-code argument, so the real bug is pr-emitter.sh:570 (die "..." 2 silently exits 1), not the cosmetic co-evolve-bouncer.sh:166. Drifted line-number citations were replaced with function-name references.

Scope

Docs only. The implementation lands as the four sequenced PRs the plan describes; an independent dev-review pass gates each one before merge.

claude added 2 commits May 28, 2026 23:54
Evidence-based audit covering portability, dependency coupling, artifact
drift, test/CI gaps, and the latency/cost/convergence profile. Top finding:
hard undetected dependency on mikefarah/yq disables the policy tier and the
scoring harness under the Python yq variant.

https://claude.ai/code/session_01XdPesF5fex8d3axheSegS8
Companion to PERFORMANCE-AUDIT.md. Converged via one co-evolution
critique->resolve pass. Staged for independent Codex review via the
dev-review methodology run from an authenticated local workstation.

https://claude.ai/code/session_01XdPesF5fex8d3axheSegS8

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c14e7e3efa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread REMEDIATION-PLAN.md Outdated
Comment on lines +16 to +17
`yq --version 2>&1 | grep -qi mikefarah || die "<actionable message>"`. Keep the
snippet byte-identical across all three sites and add a grep-pinned test asserting

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't use a byte-identical yq guard across these sites

This remediation step tells the implementer to add the same ... || die snippet to all three locations, but the inspected targets do not share that contract: lab/pel/proposer/policy/proposer.sh is intentionally self-contained and has no die helper, while lab/pel/pr-emitter/pr-emitter.sh currently exits dependency failures with code 2 via die "..." 2. Following the plan literally would either hit die: command not found in the policy proposer or regress the emitter's documented exit-code taxonomy when the wrong yq is installed.

Useful? React with 👍 / 👎.

Comment thread PERFORMANCE-AUDIT.md
Comment on lines +96 to +99
- **Why it matters:** `lib/co-evolution.sh:validate_review_verdict` enforces the *stricter*
rules at runtime while the skill ships the *looser* schema — a verifier can accept a
verdict the runtime contract rejects (or vice-versa). This is exactly the drift the repo's
own `CONCERNS.md §5` warns about, now realized.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the runtime/schema drift diagnosis

The audit says the runtime enforces the stricter root schema, but lib/co-evolution.sh:533-581 only requires verdict, confidence, summary, and issues; issue entries only need severity and description, and scope_creep_detected/iteration_notes are optional if present. That means the skill schema is not accepting verdicts that the runtime rejects in the way described here, so the remediation is likely to tighten or canonicalize the schemas for the wrong compatibility reason.

Useful? React with 👍 / 👎.

Fold the union of two independent critique passes into the v2 plan:
Claude (empirical) and Codex (structural), run as separate local
co-evolution reviews. Resolve every marker into concrete actions and
drop the self-referential "converged" status.

Add the two must-fix hazards Codex surfaced: a zero-live-markers
precondition on the 3.3 early stop (a small-delta stop could otherwise
halt with inherited markers still open), and a test-runner-scoped
hermetic git env for 2.1 that keeps production signing intact. Fold in
Claude's verified catches: die() ignores its exit-code arg (real bug at
pr-emitter.sh:570, not just cosmetic at co-evolve-bouncer.sh:166), plus
function-name references in place of drifted line numbers and a rollback
plan for Phases 2-3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants