Files
gstack/scripts/resolvers/shared-libs.ts
T
Garry TanandOpenAI Codex 06ed920a97 v1.89.0.0 feat: add shared-code extraction audit (#2925)
* feat: bind shared-code review advice to source and branch

* feat: add shared-code extraction audit and scoped review checks

* test: recognize complete source reads and explicit coverage legends

* chore: bump version and changelog (v1.88.0.0)

Co-Authored-By: OpenAI Codex <noreply@openai.com>

* test: capture native review questions and retain public evidence

Capture the actual first public native question with strict ownership and display matching. Preserve terminal failures and raw evidence, and retain SDK completion checks.

* test: recognize verified review evidence and complete fixtures

Recognize complete source and diagram evidence, concrete design and developer-experience decisions, and the complete planted scenario contracts. Preserve negative controls and grading thresholds.

* fix: preserve decision brief structure in native questions

Keep the required pros-and-cons heading and final Net field in native question text. Regenerate host outputs and document the release and evaluation repairs.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

* docs: update project documentation for v1.88.0.0

Co-Authored-By: OpenAI Codex <noreply@openai.com>

* fix: correct eval retry accounting and ship workflow gates

* fix: capture native eval evidence and stabilize CI fixtures

* fix: keep shared-code eval skips read-only

Choose explicit no-change answers instead of mixed fix/preservation options.
Reuse the bounded revalidation prompt for path fixtures so required review
metadata is available without repeated discovery. Preserve source checks,
retry limits, and failed native terminal outcomes.

Add captured-question and callback regressions, plus evaluation selection
coverage for the affected fixtures.

---------

Co-authored-by: OpenAI Codex <noreply@openai.com>
2026-09-24 01:53:58 -04:00

32 lines
2.3 KiB
TypeScript

import type { ResolverFn } from './types';
/** Shared criteria only: the caller owns scope, output, and permission to act. */
export const generateSharedLibsRubric: ResolverFn = () => `### Shared-code evaluation rubric
- **Prove the callers.** Require at least two verified, first-party authored source
locations, with functions and lines. Actual added or uncommitted source qualifies.
Only an engineering-plan review may use proposed callers; label those assumptions
and distinguish them from existing source. Similar names or formatting alone do
not establish equivalent behavior. Generated and third-party copies cannot qualify
as callers or contribute savings. Follow generated copies back to authored
templates/resolvers. Existing dependencies remain valid reuse targets.
- **Reuse before extracting.** Inspect existing libraries and helpers first. Compare
behavior, inputs, outputs, error handling, side effects, security requirements,
dependencies, and deployment/runtime boundaries. Preserve differences callers need;
do not bridge languages or isolated deployments without a practical shared contract.
- **Keep the helper small.** Name its destination and contract, the callers to migrate,
and the smallest adoption sequence. Avoid option-heavy helpers and coupling unrelated
components. Point to existing tests or established use, specify shared-contract and
caller-integration coverage, and describe the blast radius of a shared failure.
- **Account for the whole change.** Name removed blocks and their replacements. Show
estimated implementation lines removed, added, and saved separately from total lines
removed, added, and saved including tests and integration. Savings = removed - added.
Count moved code on both sides, exclude generated/vendor lines, use ranges when
uncertain, and do not count overlapping removals twice across opportunities. State
when tests or integration may make the total change grow.
- **Rank useful changes.** Favor reliability gains and total net savings, then low
adoption and testing risk. Prefer proven code used by several callers. Use recent
activity to break ties between comparable benefits, not as evidence by itself.
Explain choices centered on older code. Reject similarities with incompatible
contracts and opportunities whose benefits do not justify the abstraction.`;