Skip to content

feat(enrichment): forward linked issue envelope to REES#1863

Closed
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/enrichment-linked-issue-envelope
Closed

feat(enrichment): forward linked issue envelope to REES#1863
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/enrichment-linked-issue-envelope

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

When a PR has linkedIssues, resolve the primary issue from the local cache and forward a compact linkedIssue envelope (number, title, body) to REES so the history analyzer can correlate PR work with issue context.

Issue

Action: Open upstream issue feat(enrichment): forward linked issue envelope to REES and link Fixes #… before gate review.

Depends on

Stacks cleanly after #1862 (PR body passthrough) — rebase if both touch processors.ts.

Validation

npx vitest run test/unit/enrichment-wire.test.ts test/unit/enrichment-wiring.test.ts

Test plan

  • resolveEnrichmentLinkedIssue returns cached envelope or number-only fallback
  • buildReviewEnrichment includes linkedIssue in POST body
  • Processor wiring test seeds issue + asserts REES payload

@kiannidev kiannidev requested a review from JSONbored as a code owner June 30, 2026 10:45
@dosubot dosubot Bot added the size:M label Jun 30, 2026
@gittensory-orb

gittensory-orb Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-06-30 17:56:08 UTC

4 files · 1 AI reviewer · no blockers · readiness 48/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change adds a compact linked issue envelope for REES enrichment by resolving the first positive linked issue number from the local issue cache and forwarding it through the processor payload. The core data shape is narrowly scoped and the tests cover cached, uncached, empty, and processor-wiring paths. The most notable issue is that the processor now resolves the linked issue before checking whether enrichment is enabled, which weakens the stated flag-off behavior but does not break review output because failures are swallowed into the number-only or undefined path.

Nits — 7 non-blocking
  • nit: src/queue/processors.ts:3819 resolves linked issue cache state even when `isEnrichmentEnabled(env)` or `convergedRepoAllowed` is false; keep the lookup inside the gated enrichment branch so flag-off remains "gathers nothing" as the surrounding comment promises.
  • nit: test/unit/enrichment-wiring.test.ts:141 only covers the enabled path with a cached issue; add a disabled-enrichment assertion if you keep the current helper location, or move the helper call under the existing enrichment gate.
  • src/queue/processors.ts:3819 should compute `enrichmentLinkedIssue` only inside the `isEnrichmentEnabled(env) && convergedRepoAllowed` branch before calling `buildReviewEnrichment`.
  • test/unit/enrichment-wire.test.ts:562 should include a non-integer mixed input case if `linkedIssues` can come from parsed GitHub text or config rather than a typed producer.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:S; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR; address the blocker before review.
Contributor workload ✅ 10/10 Author activity: 3148 registered-repo PR(s), 1801 merged, 53 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 3148 PR(s), 53 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 3148 PR(s), 53 issue(s).
  • Related work: Titles/paths share 9 meaningful terms. (PR #1852)
  • Related work: Titles/paths share 6 meaningful terms. (PR #1864)
  • Related work: Titles/paths share 5 meaningful terms. (PR #1882)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Fix the blocker.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

Resolve pr.linkedIssues into a compact linkedIssue payload via the local
issue cache so REES history can correlate PR work with issue context.

Co-authored-by: Cursor <cursoragent@cursor.com>

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Please fix this and resubmit as a new PR:

The most notable issue is that the processor now resolves the linked issue before checking whether enrichment is enabled, which weakens the stated flag-off behavior but does not break review output because failures are swallowed into the number-only or undefined path.

@JSONbored JSONbored closed this Jun 30, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 30, 2026
kiannidev added a commit to kiannidev/gittensory that referenced this pull request Jun 30, 2026
Move resolveEnrichmentLinkedIssue inside the isEnrichmentEnabled branch
so flag-off reviews do no extra DB work. Addresses JSONbored review on JSONbored#1863.

Co-authored-by: Cursor <cursoragent@cursor.com>
JSONbored added a commit that referenced this pull request Jun 30, 2026
* feat(enrichment): forward linked issue envelope to REES

Resolve pr.linkedIssues into a compact linkedIssue payload via the local
issue cache so REES history can correlate PR work with issue context.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(enrichment): derive linked issue from PR body when unset

When pr.linkedIssues is empty, parse Fixes #N from the PR description so
REES history still receives linkedIssue context before sync catches up.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(enrichment): gate linked-issue resolution behind enrichment flag

Move resolveEnrichmentLinkedIssue inside the isEnrichmentEnabled branch
so flag-off reviews do no extra DB work. Addresses JSONbored review on #1863.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. gittensor Gittensor contributor context

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants