Skip to content

fix(backend): stop narrating a request flow the repository never had - #453

Merged
parthrohit22 merged 2 commits into
devfrom
fix/446-no-fabricated-request-flow
Sep 11, 2026
Merged

parthrohit22 merged 2 commits into
devfrom
fix/446-no-fabricated-request-flow

Conversation

@parthrohit22

Copy link
Copy Markdown
Collaborator

Closes #446. Off dev, independent of #450/#451/#452.

What the response said about a command-line library

pallets/click is an argument parser. No server, no routes, no HTTP surface at all.

"requestFlow": [
  {"id": "client", "name": "Client", "description": "Request enters the system.",
   "details": ["Browser or API client sends a request."]},
  {"id": "repository", "name": "Repository Layer", "description": "Persistence or source files are accessed."}
],
"architectureType": "Repository Architecture",
"architecturePattern": "Repository Architecture",
"entryPoint": "/"

The snapshot never claimed any of it. A fixed template, emitted whatever the repository turned out to be.

This is the one that matters more than its P2 suggests: the Review layer is careful — it reports not_assessed and says exactly what was not run — and then Architecture narrates a request path that does not exist. An engineer who knows the repository spots it immediately, and that is what decides whether they trust anything else on the page.

The rule

A request flow requires an observed HTTP surface — a module the snapshot classified as a route or controller. Without one there is nothing to trace, so the answer is nothing.

With one, the steps name real modules. The old details were invented verbs ("Validate request", "Transform data"); they now list the modules actually in that role, every one of which appears elsewhere in the same response — a test asserts exactly that.

The client step makes no claim about the client. It no longer says "Browser or API client"; nothing observed who the caller is.

Null instead of placeholders. architectureType, architecturePattern and entryPoint are str | None, null when nothing supports them.

Frontend

ArchSummaryBar renders a missing pattern or entry point as "Not assessed" in muted italic — not as a value sitting in the slot where a finding goes. The Request Flow tab gets a real empty state:

No request flow was observed — Nothing in this repository was classified as a route or a controller, so there is no request path to trace. A library, a CLI, or a set of scripts will look like this — it is not a gap in the analysis.

That last clause is load-bearing: absence of an HTTP surface is a property of the repository, not a shortfall in the analysis, and the copy has to say which.

Verified live

Against the real sealed snapshots in the dev database:

click (CLI library) fastapi (web framework)
architectureType null null
architecturePattern null null
entryPoint null docs_src/.../main.py
requestFlow [] client → api (Api) → repository (Repositories)

Two things I did not change, deliberately

fastapi reports no pattern. Framework detection reads dependency evidence, and the FastAPI repository does not depend on FastAPI. Null is the honest answer to what was observed; the previous answer ("Repository Architecture") was no more informative and less honest.

entryPoint picks one observed entrypoint out of many. fastapi has dozens; entry_points[0] takes the first alphabetically, landing on a docs example. Every value is a real observed fact, so it satisfies this issue — but presenting one of fifty as the entry point implies a singularity nothing established. That needs either a ranking rule or a plural field, both of which are decisions of their own. Worth its own issue; say the word and I'll file it.

Tests

2 backend tests (a library fixture produces no flow, pattern or entry point; a routed fixture still gets a flow whose every named detail is a module in the response) and 2 frontend tests (the empty state says the right thing and never renders the old sentence). Notably the whole backend suite passed before I touched a single test — nothing had ever asserted the fabricated values.

1166 backend passed / 14 skipped, 459 frontend, ruff, tsc and eslint clean, frontend contract regenerated.

pallets/click is an argument parser. It has no server, no routes and no HTTP
surface of any kind. The Architecture response for it contained a Client step
reading "Browser or API client sends a request", followed by a Repository
Layer. Neither was observed. It was a fixed template emitted whatever the
repository turned out to be, and for this one every word of it was false.

Three placeholders in the same response did the same thing more quietly:
`architectureType` and `architecturePattern` both read "Repository
Architecture", which restates that the subject is a repository and names no
pattern; `entryPoint` read "/", which is not a path click has.

The snapshot never claimed any of it. This is entirely the presentation
layer asserting things the engine did not find, in a product whose whole
position is that every claim traces to evidence -- and an engineer who knows
the repository spots it immediately, which is what decides whether they
trust anything else on the page.

A request flow now requires an observed HTTP surface: a module the snapshot
classified as a route or a controller. Without one there is nothing to trace
and the answer is nothing, which the view states as a property of the
repository rather than as a gap in the analysis. With one, each step names
the modules genuinely in that role instead of narrating invented verbs
("Validate request", "Transform data") at the reader.

A pattern that was not detected and an entry point that was not observed are
now null, and the summary bar renders them as "Not assessed" rather than
leaving a placeholder sitting in the slot where a finding goes.

Live on click: no flow, no pattern, no entry point. On fastapi: a flow of
client, api and repository, each naming its real modules.

Closes #446
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
partha-frontend Ready Ready Preview Sep 11, 2026 6:01pm UTC

…k cell

mypy caught what the nullable summary fields meant for the exported report:
`architecture_type` and `entry_point` feed a `list[str]` table row, so a null
would have been a type error and, had it type-checked, an empty cell.

An exported report has to carry the same absences as the view it reports on.
A blank reads as an oversight; "Not assessed" reads as the finding it is.
@parthrohit22
parthrohit22 merged commit 1dbba82 into dev Sep 11, 2026
14 checks passed
@parthrohit22
parthrohit22 deleted the fix/446-no-fabricated-request-flow branch September 11, 2026 18:31
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.

fix(backend): Architecture invents an HTTP request flow for repositories that have none

1 participant