Repository navigation
fix(content): name the label or item blocking a root hand-over - #521
CloudCorpRecords wants to merge 2 commits into
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
e6f2a81 to
bd1b526
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
[Medium impact] The PR appears safe to merge; no blocking issue remains.
|
Comments Outside DiffThese findings could not be posted inline.
|
✅ All code review findings resolved.
A refused Make default now says what to fix. When the old default type's plural name would become a route word Gophenberg keeps (page), the refusal names the label and the word it makes and says to change the plural name, instead of pointing at a route word field the flow does not have. When an item would land on a root pagination address (page/2), the refusal names the address and says to give the item a different slug. Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com>
PaginationAddressReserved and LabelRouteWordReserved had no tests in the content package itself, so codecov reported their lines uncovered. Add package level tests asserting the sentinel, the code, the details and the message for both constructors. Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com>
10d9528 to
8cdcb4c
Compare
Code Review ✅ Approved 4 closed / 4 findings🔴 High risk · Replacing refusal codes for root handovers and pagination conflicts changes API error contracts, which could break clients matching the previous codes. Adds distinct refusal codes ✅ 4 closed✅ Bug: content package fails to build: RootPagination and slugOf undefined
✅ Bug: postgres pagination helpers don't compile and are never called
✅ Bug: New contract cases use undefined helpers and are never registered
✅ Bug: Regenerated .pot/.po drop strings the frontend still uses
VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
There was a problem hiding this comment.
Gates Failed
Prevent hotspot decline
(1 hotspot with Bumpy Road Ahead)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(1 file with Large Method)
Our agent can fix these. Install it.
Gates Passed
1 Quality Gates Passed
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| memorytypes_test.go | 1 rule in this hotspot | 7.61 → 7.55 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| memorytypes_test.go | 1 critical rule | 7.61 → 7.55 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| errorTemplates.ts | 1 advisory rule | 7.44 → 7.41 | Suppress |
Absence of Expected Change Pattern
- gophenberg/internal/content/types.go is usually changed with: gophenberg/internal/content/registry_internal_test.go
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Closes #513
What changed
A refused Make default now says what to fix, one message per case:
route_word_reserved_by_labelcarrying the label and the word. The admin message names the plural name and says to change it, instead of pointing at a route word field the Make default flow does not have.pagination_address_reservedcarrying the path. The admin message names the address and says to give the item a different slug.Both codes are new. The plain
route_word_reservedandaddress_reservedcodes keep their existing messages for the direct-edit flows where that advice is right. The refusal constructors (content.LabelRouteWordReserved,content.PaginationAddressReserved) sit in the content package next to the existing ones; the postgres store and the in-memory test store emit them alike. The new strings are translated to Spanish and French following the repo's i18n pattern (.pot regenerated withpnpm pot, translations drafted in the .po files, JSON catalogs rebuilt withpnpm catalogs).Testing
go test ./internal/content/...passes, including with-race.go test ./internal/server/passes exceptTestUploadingMediaMasksAFailingLibrary, which also fails on unmodified main (pre-existing, unrelated to this change).go test ./test/features/ -run 'TestContentTypes|TestContentServing|TestTypeStoreSuite|TestContentStoreSuite'passes (godog feature suite plus the store contract suites, memory stores).vitest run src/test/errors.test.tspasses (15 tests, including the every-code-has-a-message coverage test and two new template tests);pnpm typecheck,pnpm -w lint,gofmtandgo vetare clean.Summary by CodeRabbit