Skip to content

feat: route feedback to the server FlyBot Lead and complete the triage lifecycle #814

Open

Description

@HugoXK

Written-by: HugoXK

Problem

A feedback or unexpected-error report currently stops at the maintainer mail. The server-deployed FlyBot's Fledge Lead never sees it, the reporter is never told whether it was a user problem, a duplicate, or a confirmed platform defect, and there is no path from “confirmed” to “fixed in version X” to “the updated service is live”. The Lead also has no safe way to write a conclusion back to GitHub without risking user data in a public issue.

Proposal

1. Route each report to the Fledge Lead

Support both deployment shapes, in this order:

  1. FLEDGE_LEAD_REPO_ID=repo_... — a normal repo connected to Fledge; call
    instances.sendGuidance(repoId, 'lead', packet).
  2. FLEDGE_LEAD_BRIDGE_URL + FLEDGE_LEAD_BRIDGE_TOKEN + FLEDGE_LEAD_SESSION_ID —
    an externally managed FlyBot; POST the same packet to the bridge's /dsh
    send endpoint.

If neither is configured or the Lead is unreachable, keep the record and fall
back to the maintainer mail; the user's submission must still succeed.

The packet carries a short safe summary, the ref, the public-repo name, whether
the reporter consented to a public @mention, and a per-ref signed triage token.
It tells the Lead exactly how to read the full redacted record and write a
conclusion; raw stack/message stays behind the triage API, not in a public issue.

2. Triage API and lifecycle

  • GET /api/feedback/:ref with the signed token: the redacted feedback/error
    record and its event history.
  • POST /api/feedback/:ref/triage with the signed token:
    status, user_message, public_summary, issue_url, pr_url,
    fixed_version, duplicate_of.
  • Statuses: user_error, duplicate, needs_info, confirmed,
    issue_opened, pr_opened, fixed, wontfix, plus system released.
  • Each transition appends feedback_events and notifies the reporter in-app and
    by mail when there is a signed-in account and a user message. Anonymous error
    reports have no notification target; they still keep the audit trail.
  • The Lead creates the public, sanitized GitHub issue itself and records its URL
    through the API. Fledge never publishes the raw message, stack, email or token.

3. Public issue, @mention and consent

  • Feedback form: optional “I agree Fledge may @ my GitHub account in a sanitized
    public issue citing this feedback.”
  • Error report: the required failure-data consent stays; an additional optional
    public @mention consent appears only when signed in.
  • With consent, the Lead may @ the reporter, thank them and cite the ref in a
    sanitized issue. Without consent, the Lead can still triage privately and the
    reporter still receives in-app/mail updates, but no public mention is made.

4. Fixed and released notifications

  • The Lead records pr_url and fixed_version on a confirmed fix.
  • When the running VERSION is at or above fixed_version, Fledge notifies the
    reporter once: “fixed in vX” with the issue and PR links.
  • After the platform service is updated, the same scan marks the record
    released and sends the final “now live in vX” notification once. A re-deploy
    of the same version does not send it twice.
  • SemVer comparison reuses src/releases/release.ts, not a second parser.

5. Data and privacy

New feedback_triage and feedback_events tables (additive). The triage row
holds status, consent flags, issue/PR URLs, fixed/released versions, the
user-facing message, public summary and last-notified state. Raw feedback/error
data stays in the existing tables; the signed triage token is per ref and is
delivered only through the private Lead channel.

Scope and tier

Config, src/db.ts, src/app.ts, src/feedback/, src/email/templates.ts,
src/views/, tests, docs, .env.example, changelog. T3.

Verification

  • A repo-mode send reaches instances.sendGuidance(repoId, 'lead', …); a
    bridge-mode send reaches /dsh with the configured session and token.
  • The triage API rejects a bad token and an invalid status; a valid transition
    records the event, updates the row and notifies the signed-in reporter once.
  • fixed_version at or below VERSION sends the fixed notification and then the
    released notification exactly once.
  • Public-issue consent is stored and appears in the packet; no raw message,
    stack, email or token is placed in a public issue by Fledge.
  • npm run check passes.

Activity

  1. added
    enhancementNew feature or request
    area:securitySecrets, authz, data exposure
    area:deployDeploy, backup, logs, systemd
    area:uiViews, CSS, accessibility, i18n
    area:jobsJob lifecycle, queue, callbacks
    needs-reviewWaiting for the Fledge Platform Reviewer's issue review
    on Nov 15, 2026
  2. HugoXK commented on Nov 15, 2026

    @HugoXK
    OwnerAuthor

    Written-by: HugoXK

    Implemented in PR #816, stacked on #797. The card remains unclaimed and marked needs-review; both PRs are ready for the Issue-review PASS and bot review. The design routes to the server FlyBot Lead through either a connected repo or the direct bridge, keeps the triage token per ref, and never publishes raw user data.

  3. HugoXK-bot commented on Nov 15, 2026

    @HugoXK-bot
    Collaborator

    Issue-review: CHANGES at issue #814 body 390d2e4733bd
    Written-by: HugoXK-bot
    Posted-by: HugoXK-bot

    Body hash 390d2e4733bd (raw); premises checked against live main 0883935f.

    The problem is accurate — feedback and error reports stop at maintainer mail because the only surfaces are the ones #796 is adding — but the card cannot be claimed in its current shape, for three reasons.

    Blocking:

    1. It depends on code that is not on main. "Raw feedback/error data stays in the existing tables" is not true at 0883935f: feedback and error_reports exist only in open PR feat: add feedback, a Star CTA and one-click error reports #797 (src/db.ts has neither, and no FEEDBACK_EMAIL anywhere). The card must say it starts after feat: add feedback, a Star CTA and one-click error reports #797 merges, or carry the migration dependency explicitly.
    2. It is an umbrella. The body is five slices with five different risk shapes — Lead routing in two deployment modes, a triage API with nine statuses plus an event table, consent and sanitized public issues, fixed/released notifications with SemVer comparison, and two new tables — across config, src/db.ts, src/app.ts, a new src/feedback/, mail templates, views, docs and .env.example, at T3. That is not one reviewable PR; split it into at least: (a) routing + config, (b) triage API + events, (c) consent/public mention, (d) fixed/released notifications. agent-ready explicitly excludes umbrellas.
    3. The notification trigger is unnamed. "When the running VERSION is at or above fixed_version, Fledge notifies the reporter once" has no place to run: src/config.ts:112-115 carries build.commit and build.builtAt but no version, the running version comes from releaseSurface() reading package.json (src/lib/releaseSurface.ts:65-68), and nothing schedules a scan today. Say whether it is a startup sweep, a job, or part of the release check, and what column holds "notified" — otherwise "exactly once" cannot be tested.

    Verified for the parts that are precise: instances.sendGuidance(repoId, target, text) exists (src/flybot/instances.ts:872) and is already used with 'lead' (src/app.ts:5681), the bridge target /dsh exists (src/flybot/instances.ts:532, bridge/flybot-bridge.mjs:10), and the SemVer helpers the card says to reuse are parseVersion/compareVersions (src/releases/release.ts:20, :43).

    Conclusion: CHANGES at body 390d2e4733bd — the premise holds, but the card is an umbrella over an unmerged dependency and names no trigger for its once-only notification.

  4. added
    review:changesIssue needs changes before it can be claimed
    and removed
    needs-reviewWaiting for the Fledge Platform Reviewer's issue review
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:deployDeploy, backup, logs, systemdarea:jobsJob lifecycle, queue, callbacksarea:securitySecrets, authz, data exposurearea:uiViews, CSS, accessibility, i18nenhancementNew feature or requestreview:changesIssue needs changes before it can be claimed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions