fix(backend): stop narrating a request flow the repository never had - #453
Merged
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #446. Off
dev, independent of #450/#451/#452.What the response said about a command-line library
pallets/clickis an argument parser. No server, no routes, no HTTP surface at all.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_assessedand 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
detailswere 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,architecturePatternandentryPointarestr | None, null when nothing supports them.Frontend
ArchSummaryBarrenders 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: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:
architectureTypenullnullarchitecturePatternnullnullentryPointnulldocs_src/.../main.pyrequestFlow[]Api) → repository (Repositories)Two things I did not change, deliberately
fastapireports 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.entryPointpicks 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,tscandeslintclean, frontend contract regenerated.