Skip to content

feat: assess PR cost of delay across four value dimensions - #19

Merged
yyeret merged 4 commits into
mainfrom
codex/jev-cost-of-delay
Oct 26, 2026
Merged

yyeret merged 4 commits into
mainfrom
codex/jev-cost-of-delay

Conversation

@yyeret

@yyeret yyeret commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

PR assessments now separate value, time criticality, opportunity runway, and risk reduction so users can see what drives each relative cost-of-delay estimate. Jev classifies each element on 1, 2, 3, 5, 8, 13; code sums the four scores to a total of 4–52. Each PR assessment uses only the first 1,500 characters of its description plus compact repository context; an empty description returns insufficient_context with no score or Jev request.

This extends the product-value assessment introduced previously. Gemini still infers product context and strategic direction once per analysis. Scores describe expected contribution from public repository and PR text; they are not measured impact, money, or WSJF.

Callers can supply Jev and Gemini keys per analysis or use deployment defaults. Caller-funded results bypass shared caching and retain a session-scoped coaching snapshot without persisting credentials.

The product_value API payload replaces High/Medium/Low/Unclear ratings with dimension scores and probability distributions. Clients consuming the old fields must update; the hosted cache namespace changes to avoid serving the old shape.

Related: #17, #21

Validation

  • 301 tests pass with 94.40% coverage; Ruff and all six security stages pass.
  • Regression coverage verifies the 1,500-character boundary, description-only state, empty descriptions, Fibonacci aggregation, caller-key overrides, session isolation, and deadlines. Malformed probability objects, including unsupported buckets, remain unscored. Context truncation recovery, native fetch abort wiring, safe error reasons, and correlated logs remain covered after integrating the current main branch.
  • The updated local HTTP API probe classified five saved public Spec Kit descriptions through five live Jev calls in 0.25 seconds. An empty-description control returned no score and made no Jev call. The probe reused valid recorded repository context; it did not collect fresh GitHub data, call Gemini, or run on hosted Workers. The earlier 30-PR trial remains documented as historical evidence.
  • Trial results and limitations: Hermes Desktop integration scored 18; routine release preparation scored 4. No human-rated calibration benchmark exists.
  • All five frontend API-response and rendering tests pass after adapting their DOM fixture to the provider-key fields. Browser layout was not exercised under the API-first scope.
  • Compound Engineering review completed (pr19-description-merge-6d2003a3) with no actionable findings. The configured Claude peer could not authenticate; the independent local adversarial fallback completed. A suggested mixed scored/unscored rendering check was added and passes. Native Workers cancellation remains unverified at runtime.

The assessment budget is 90 seconds, preserving completed scores on expiry. Unavailable-key results cache for ten minutes. Hosted caller-key chat cannot fall back to a different shared result; local caching remains within the trusted single-user process. Separate requests intentionally start separate provider work; cross-request deduplication was declined because it needs an explicit idempotency contract.

New concepts

A probabilistic rubric assigns likelihoods to ordered levels instead of returning one unexplained rating.
Jev answers four typed Score questions in a single request per PR.
Each answer includes a distribution over six levels.
The application chooses the most probable level, with lower levels winning ties.
It maps that level to Fibonacci points before adding the four dimensions.
Averaging the levels would produce values outside the requested scale.
For example, risk probabilities of 51% for 5 and 42% for 8 select 5 but expose the close call.
The full distribution remains available for review.
Model confidence does not establish that a score is correct.
These estimates need human validation before consequential prioritization.


Compound Engineering

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://codex-jev-cost-of-delay-github-flow-analytics.yuval-yeret.workers.dev (commit ed7258d)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://bb102558-github-flow-analytics.yuval-yeret.workers.dev ed7258d 2026-10-25T11:15:14.741Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://40b4c229-github-flow-analytics.yuval-yeret.workers.dev 4c1fa45 2026-10-25T11:11:12.698Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9eba2302-github-flow-analytics.yuval-yeret.workers.dev bec4eae 2026-10-24T01:44:24.357Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://4d1f1203-github-flow-analytics.yuval-yeret.workers.dev 774fd61 2026-10-24T01:36:06.567Z Visit the dashboard ↗

@tessl-reviewer tessl-reviewer 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.

Tessl Reviewer

Advisory findings (7)

The cost-of-delay implementation correctly adds the four-dimensional assessment and session-scoped hosted snapshots for the normal signed-in path, but caller-key isolation is incomplete in the unauthenticated and local-server paths. Slow or repeated assessments can also place disproportionate load on the providers, and an unavailable provider configuration can remain cached long after it is repaired. The documentation contains one misleading interpretation of the aggregate and one reference to an unavailable trial artifact.

Severity Findings
Major 2
Minor 5

Advisory findings (7)

  • Major · Advisory · Non-blocking · A full assessment has no overall latency bound
    product_value.py:261
  • Major · Advisory · Non-blocking · Identical caller-key analyses can start independent provider fan-outs
    cloudflare_app.py:241
  • Minor · Advisory · Non-blocking · Unauthenticated caller-key analyses have no coaching snapshot
    cloudflare_app.py:257
  • Minor · Advisory · Non-blocking · Local caller-key analysis overwrites the shared coaching snapshot
    app.py:269
  • Minor · Advisory · Non-blocking · Unavailable provider configuration is cached for six hours
    cloudflare_app.py:265
  • Minor · Advisory · Non-blocking · The README equates a low aggregate with low contribution
    README.md:77
  • Minor · Advisory · Non-blocking · The trial record references a result artifact that is not present
    docs/experiments/2026-10-23-jev-cost-of-delay-spec-kit.md:12

Reviews are incremental. The first review shows every valid finding. A later round checks the latest changes and earlier findings, and adds a fresh finding when it still applies. It never repeats one you refuted or declined. Ask for a full review to inspect the whole change and show earlier findings again.

Mention @tessl-reviewer to run another review.

Comment thread cloudflare_app.py Resolved
Comment thread app.py Resolved
Comment thread product_value.py Resolved
Comment thread cloudflare_app.py Resolved
Comment thread cloudflare_app.py Resolved
Comment thread README.md Resolved

@tessl-reviewer tessl-reviewer 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.

Tessl Reviewer

Advisory findings (1)

The change is approved with 1 optional suggestion.

Severity Findings
Major 1

Advisory findings (1)

  • Major · Advisory · Non-blocking · The 90-second assessment budget does not bound context acquisition
    product_value.py:272
    Still applies at the location above. See the earlier thread.

Earlier findings: 1 still applies · 4 addressed · 2 declined

About this review

These findings are AI-generated and not authoritative. Check each one against the code before acting on it. See the guidance on working with this review.

Mention @tessl-reviewer to run another review.

@yyeret

yyeret commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

The 90-second assessment budget does not bound context acquisition

No further change is needed for the production budget: context acquisition already has two 10-second GitHub deadlines and one 25-second Gemini deadline, each enforced by asyncio.wait_for in _request. Its bounded 45-second phase is below ASSESSMENT_TIMEOUT = 90. The deadline timestamp is captured before that phase, so only the remaining budget is available to Jev; context time does not restart the clock. The context-budget regression verifies that subtraction. The new bound addresses the former six-wave Jev wait while preserving completed items.

Integrate main product-context recovery and safe diagnostics. Restrict Jev evidence to the first 1500 description characters; keep empty descriptions unscored. Preserve four Fibonacci dimensions, caller keys, partial results and the overall assessment deadline.

@tessl-reviewer tessl-reviewer 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.

Tessl Reviewer

Advisory findings (1)

1 finding requires changes before approval.

Severity Findings
Major 1

Advisory findings (1)

  • Major · Advisory · Non-blocking · Unsupported probability buckets can produce a valid-looking score
    product_value.py:274

Earlier findings: 2 declined · 5 addressed

About this review

These findings are AI-generated and not authoritative. Check each one against the code before acting on it. See the guidance on working with this review.

Mention @tessl-reviewer to run another review.

Comment thread product_value.py Resolved

@tessl-reviewer tessl-reviewer 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.

Tessl Reviewer

No advisory concerns

The cost-of-delay assessment now validates complete six-level distributions, applies its shared deadline to the scoring phase after context time has elapsed, and keeps caller-key coaching isolated from shared hosted results. The documented cache, aggregation, and trial-evidence updates match the reviewed implementation; no verified unresolved defect remains among the supplied concerns.

Earlier findings: 6 addressed · 2 declined

Linked sources: 1 fetched, 0 not fetched
  • Fetched: https://raw.githubusercontent.com/yyeret/github-analytics/bec4eae/docs/experiments/2026-10-23-jev-cost-of-delay-spec-kit.md
  • 10 other links in the pull request were not requested and not opened.
About this review

These findings are AI-generated and not authoritative. Check each one against the code before acting on it. See the guidance on working with this review.

Mention @tessl-reviewer to run another review.

@yyeret
yyeret merged commit b779711 into main Oct 26, 2026
5 checks passed
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.

1 participant