Repository navigation
#15: Assess each PR's expected value to the repository's product - #17
Conversation
One Gemini call per analysis builds product context (summary, value proposition, lean canvas, strategic goals) from the repository description, topics and README. One Gemini call per sampled PR then rates expected value (High/Medium/Low/Unclear) with confidence, beneficiaries, why it matters, the matching goal and missing context. Content framing is passed as evidence only. Results are labelled as expectations, not realized impact, and degrade to a status and reason when no key is configured or the context call fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://tessl-issue-15-github-flow-analytics.yuval-yeret.workers.dev (commit 1aadb4c)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
There was a problem hiding this comment.
Tessl Reviewer
Advisory findings (11)
The product-value feature is integrated into both analysis paths and the dashboard, but its sampling/accounting, fail-soft handling, privacy boundary, and hosted caching/concurrency behavior leave several cases with misleading results, unnecessary provider load, or unavailable analysis responses.
| Severity | Findings |
|---|---|
| Major | 4 |
| Minor | 7 |
Advisory findings (11)
- Major · Advisory · Non-blocking · Malformed context JSON bypasses the product-value fail-soft result
product_value.py:187 - Major · Advisory · Non-blocking · The README retrieval can disclose content after a repository becomes private
product_value.py:98 - Major · Advisory · Non-blocking · Gemini request timeouts are absent in the Worker transport
product_value.py:120 - Major · Advisory · Non-blocking · Concurrent uncached analyses duplicate all Gemini product-value work
cloudflare_app.py:244 - Minor · Advisory · Non-blocking · Duplicate PR numbers can pair a merged classification with an open snapshot
product_value.py:126 - Minor · Advisory · Non-blocking · The displayed assessment denominator is not the selected PR sample
product_value.py:173 - Minor · Advisory · Non-blocking · The hosted privacy notice omits the new Gemini disclosures
product_value.py:178 - Minor · Advisory · Non-blocking · A transient context failure is retained in the six-hour analysis cache
cloudflare_app.py:246 - Minor · Advisory · Non-blocking · The claimed most-recent PR sample is not consistently ordered by recency
product_value.py:125 - Minor · Advisory · Non-blocking · Empty assessment narratives are published as high-confidence assessments
product_value.py:144 - Minor · Advisory · Non-blocking · Cached analyses do not reflect the current Gemini-key state described in the README
README.md:72
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.
- Validate and normalize Gemini's product context inside the fail-soft path. - Read repository metadata first and send nothing to Gemini unless it is public. - Enforce request deadlines with asyncio.wait_for so they hold on Workers fetch. - Select the most recent PRs by date and pair each with its own cohort record. - Report the selected sample size and use it as the dashboard denominator. - Downgrade assessments without reasoning to Unclear with Low confidence. - Cache analyses with Gemini failures for ten minutes instead of six hours. - Disclose product value data sent to Gemini on the privacy page. - Document how cached analyses relate to the Gemini key state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Failed checks on 736c142, both outside this PR's diff:
Review findings are answered in their threads and fixed in 37a0bf6, except the cross-caller dedupe, which I declined as out of scope. Locally on 37a0bf6: |
There was a problem hiding this comment.
Tessl Reviewer
Advisory findings (1)
1 finding requires changes before approval.
| Severity | Findings |
|---|---|
| Major | 1 |
Advisory findings (1)
- Major · Advisory · Non-blocking · A repository can become private between the visibility check and README retrieval
product_value.py:110
Still applies at the location above. See the earlier thread.
Earlier findings: 1 still applies · 9 addressed · 1 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.
|
1
*Yuval Yeret*AI Adoption Catalyst | Shaping the shift to AI-Ready operating
systems | Flow | Product thinking | Agility
🔗LinkedIn <https://www.linkedin.com/in/yuvalyeret/> 🎧Podcast
<https://yuvalyeret.com/podcast> 📝 Blog <https://yuvalyeret.com/blog> 📅
Calendar <https://yuvalyeret.com/meet/chat> 📱617-356-7093
…On Fri, Oct 23, 2026 at 10:22 AM tessl-app[bot] ***@***.***> wrote:
***@***.***[bot]* commented on this pull request.
------------------------------
In product_value.py
<#17 (comment)>
:
> +
+
+def _github_headers(token):
+ headers = {"Accept": "application/vnd.github+json", "User-Agent": "github-flow-analytics/0.1"}
+ if token:
+ headers["Authorization"] = f"Bearer {token}"
+ return headers
+
+
+async def fetch_product_sources(repo, token=None):
+ """Repository description, topics, homepage and README text from GitHub's REST API."""
+ headers = _github_headers(token)
+ base = f"https://api.github.com/repos/{repo}"
+ (meta_status, _, meta), (readme_status, _, readme) = await asyncio.gather(
+ request_json(base, headers=headers, timeout=10),
+ request_json(f"{base}/readme", headers=headers, timeout=10))
@yyeret <https://github.com/yyeret> this finding came back after my fix
in 37a0bf6
<37a0bf6>,
so I need your call before changing more.
The reviewer is right that a gap remains. fetch_product_sources checks private:
false on the metadata response, then fetches /readme in a second request
with the service GITHUB_TOKEN. If the repository goes private between
those two calls, the token can still read the README, and it is sent to
Gemini. The window is one round trip, but no ordering of two authenticated
calls closes it.
The one fix that does close it is to fetch the README without the token,
so GitHub itself refuses anything that is not public at that moment. The
cost: unauthenticated GitHub calls are limited to 60 per hour per IP, and
Workers share egress IPs, so the README would often be rate limited and
product context would then fall back to description and topics only.
Which do you want?
1. Fetch the README unauthenticated and accept the rate limit fallback.
2. Keep the current check and accept the one request window as a known
limit, noted in the README.
3. Something else, for example dropping the README from the Gemini
context.
—
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=ABRXBJUYFCHEFLEITRG4WGT5VNSTRA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKNRSHE2TSNJYGA3KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#discussion_r4360561770>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRXBJUFZZ5HRK44LZUX2BD5VNSTRAVCNFSNUABGKJSXA33TNF2G64TZHMYTENJUGI4DQNJZHE5US43TOVSTWNJZHE4TENRXHE2DDILWAI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The owner chose to close the visibility race: the README request is now unauthenticated, so GitHub refuses it if the repository went private after the metadata check. A refused or rate-limited README falls back to the description and topics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, went with option 1: the README is now fetched without the GitHub token, in 1d1ae42. Details are in the review thread. |
There was a problem hiding this comment.
Tessl Reviewer
No advisory concerns
No findings to surface.
Earlier findings: 10 addressed · 1 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.
|
PR ready for review: #17
|
|
tessl fix failing checks |
certifi 2026.7.22 -> 2026.10.23 (PYSEC-2026-4320) and opentelemetry-api 1.45.0 -> 1.45.1 (CVE-2026-114603) so the audit job's locked runtime advisories step passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed audit in 34d4505: Workers Builds: github-flow-analytics I cannot fix from here: its log is only on the Cloudflare dashboard, which I cannot read. |
There was a problem hiding this comment.
Tessl Reviewer
No advisory concerns
The product-value assessment is integrated with the analysis paths, cache behavior, dashboard accounting, and public disclosure. The reviewed fixes preserve fail-soft behavior, apply dependency deadlines, retain cohort-specific PR records, and prevent authenticated README retrieval after a visibility transition. The only outstanding concurrency concern was explicitly acknowledged and deferred by the change author.
Earlier findings: 10 addressed · 1 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.
|
Workers Builds: github-flow-analytics also failed on 34d4505, and I still cannot fix it from this branch. The check run (120518920385) started and completed in the same second, 16:07:48Z, so the build ended before any build step ran. It is the same on every PR branch in this repository, #4 through #17, including #5, which then passed on That pattern points to the Workers Builds setup for non-production branches, not to this diff. @yyeret, can you check the build log, or the project's non-production branch build settings in Cloudflare? If the log shows an error in this PR's code, paste it here and I will fix it. |
There was a problem hiding this comment.
Tessl Reviewer
Advisory findings (1)
1 finding requires changes before approval.
| Severity | Findings |
|---|---|
| Major | 1 |
Advisory findings (1)
- Major · Advisory · Non-blocking · Every branch preview receives the shared preview users database
wrangler.jsonc:81
Earlier findings: 10 addressed · 1 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.
|
PR ready for review: #17 |
Checked the hosted build log: Fixed in 1aadb4c: branch previews now have an explicit configuration with a separate staging KV namespace and D1 database, required authentication, and separate rate-limit namespaces. The repeatable provisioning script defaults to a read-only plan and refuses production bindings before account writes. The actual hosted Preview build for 1aadb4c now succeeds, alongside the Python CI matrix, audit and Tessl Reviewer checks. Production bindings and data were preserved. |
Summary
Repository analysis now estimates each sampled PR's expected value to the product, alongside its outcome framing. Gemini infers product context from the repository description, topics and README, then rates up to 30 recent PRs (up to 10 open) as High, Medium, Low or Unclear, with confidence, beneficiaries, rationale, a matching strategic goal and missing context. The dashboard labels these as expectations, never verified impact.
Only public repositories are assessed. README retrieval is unauthenticated to prevent a visibility change from exposing private content; a refused or rate-limited README falls back to metadata. The privacy notice covers the repository and PR text sent to Gemini.
Missing keys, invalid context and provider failures leave the remaining analysis usable. Request deadlines apply locally and on Workers; incomplete reasoning becomes Unclear with Low confidence. Hosted results cache for six hours, shortened to ten minutes after Gemini failures. An uncached analysis makes up to 31 Gemini calls, with five PR assessments at a time; coordination across simultaneous callers remains deferred.
The lock also upgrades
certififrom 2026.7.22 to 2026.10.23 andopentelemetry-apifrom 1.45.0 to 1.45.1 to clear the runtime advisory check.Cloudflare branch previews now build with explicit staging bindings. The setup script creates or reuses isolated KV and D1 resources, initializes their schema and preserves production bindings. Preview branches intentionally share staging data; only trusted repository branch code should deploy against it. Authentication stays required. Google OAuth origins and preview service secrets remain separate setup.
Closes #15
Related: #16 (Jev follow-up)
Validation
1aadb4c. Tessl's shared-staging advisory was declined and its thread resolved: preview branches use the documented trusted staging boundary, with production on separate resources./api/healthreturns{"ok":true}and/api/auth/sessionreports signed out. Production was not deployed.Five preview-provisioning tests cover offline planning, resource reuse/creation and rejecting production IDs before writes. Preview sign-in, live Gemini assessments and the signed-in results layout remain unverified; preview OAuth origins and the Gemini secret were outside this setup.
🤖 Generated with Claude Code