Skip to content

fix/ml feature vector truncation - #113

Open
deep60 wants to merge 3 commits into
mainfrom
fix/ml-feature-vector-truncation
Open

deep60 wants to merge 3 commits into
mainfrom
fix/ml-feature-vector-truncation

Conversation

@deep60

@deep60 deep60 commented Aug 27, 2026

Copy link
Copy Markdown
Owner
  • fix(api): return the user's own submissions from GET /submissions
  • fix(ci): clear the two clippy errors blocking Rust CI
  • fix(analysis-engine): stop truncating the ML feature vector

deep60 added 3 commits August 20, 2026 18:16
`create_file_submission` writes to the `submissions` table (what a user
uploads), but `list_submissions` delegated to `get_submissions`, which reads
`bounty_submissions` (an analyst's verdict against a bounty). Two different
tables, two different meanings. The result was that anything a user submitted
was returned by no list endpoint at all: submit a file, get a 200 and an id,
then watch it vanish from the dashboard and marketplace.

Verified against the live deployment - after submitting, gateway.submissions
held 1 row while GET /submissions returned {"submissions":[]} from
bounty_submissions.

Now returns the caller's own submissions, newest first, as a flat camelCase
array. Both details match what the client already expects:
marketplace.tsx declares useQuery<ApiSubmission[]>, and the default fetcher in
queryClient.ts does no unwrapping, so the previous envelope object arrived
where an array was required. `status` and `analysisStatus` are both emitted
because ApiSubmission reads each in different places.

Scoped to the authenticated submitter - the route is in the strict-auth group
and returning other users' uploads would leak filenames and descriptions.

analysisType/bountyAmount/priority/description are lifted out of the row's
metadata JSON, which is where create_file_submission puts them.
Rust CI has failed on main for the last four runs, so every PR inherits a red
`build` check. Both errors are `-D warnings` promotions from a newer clippy and
are unrelated to any recent change:

  api-gateway/src/handlers/websocket.rs:92
    useless conversion to the same type: `String`  (drop `.into()`)

  analysis-engine/src/analyzers/static_analyzer.rs:707
    casting to the same type is unnecessary (`u32` -> `u32`)  (drop the cast)

Fixed here rather than in a separate PR because they block this one from
merging; neither file is otherwise touched by this branch.
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