Repository navigation
Inherit a parent's enum values live when a subtype extends the field (closes #3749) - #3764
Conversation
Code Review: PR #3764 (closes #3749)Review TypeInitial review (no prior reviews or comments). Commit reviewed: 27c7c44. Requirements Check (issue #3749 acceptance criteria)
Code Review FindingsCritical / Blocker
Suggested Improvements
Nitpicks
AGENTS.md rules
RecommendationREQUEST CHANGES. The core design is right and well tested for validation and resolution, but one reader ( |
malibio
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES (self-authored PR, so posted as a comment). Blocker: packages/core/src/ops/entity_types_block.rs:297 still builds fields with flatten_chain_by_name, so an issue's entity-type block lists only its two added statuses. Route it through flatten_chain_fields and add a test. Full report in the previous comment.
Review addressedFixed
Re-pointing Not done: the issue's "one function in TypeScript" — the frontend reads backend-resolved fields (
🤖 Generated with Claude Code |
Code Review: PR #3764 (closes #3749), re-reviewReview TypeRe-review of ab20437 (the single fix commit on top of 27c7c44). Only Previous Review SummaryREQUEST CHANGES: 1 blocker, 3 suggested improvements (+ test/comment items), 2 nits.
Verification
FindingsCriticalNone. Suggested Improvements
Nitpicks
AGENTS.md rulesPass: no compatibility code, no suppression, no issue numbers in comments, no literal node_type comparisons, no new lifecycle reads, no wire-type change in this commit. I did not re-run the Rust tests locally; the author reports RecommendationAPPROVE. The blocker is fixed through the single field builder with a test that fails without it, and the remaining items are optional. Reminder: push the nodespace-docs changes (node-types.md, ADR-078) just before |
malibio
left a comment
There was a problem hiding this comment.
Re-review verdict: APPROVE (self-authored PR, posted as a comment). The entity_types_block.rs blocker is fixed via flatten_chain_fields with a test; hoist, closure walk, and tests verified. Details in the previous comment. Reminder: push nodespace-docs before bun run merge.
…loses #3749) An extending schema now stores only the values it adds; the field's values are the ancestors' current ones plus each extending type's own, placed after the value each maps to. Adding a value a descendant already added is refused, naming the descendant. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…uilder - Route EntityTypeDescriptor::from_chain through flatten_chain_fields so a subtype's enum lists the ancestors' values (an issue's status regressed to its two own values in the agent prompt) - Read descendants once per add_field_values call, through the subtype closure - Add tests: descriptor vocabulary, mixed core/user values over three levels, root-addition position, re-pointing a type that holds an extension - Fix a stale comment and note the stored-schema read in valid_task_statuses Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
cd8383f to
5d06c26
Compare
Closes #3749
What changes
A type that extends an inherited enum field now stores only the values it adds. The field's values are built along the
extendschain as the ancestors' current values plus each extending type's own, each added value placed after the value it maps to.flatten_chain_fields(schema/extends_chain.rs) is the one function that builds the effective field set; every reader (validation,get_schema_definition,maps_to, boards, tables, agent tools, entity-type blocks) already goes through it. The frontend reads backend-resolved fields viagetSchema, so no TypeScript composer was needed.extend_inherited_fieldstores the extension with its added values only; the seededissueschema declareschanges_requestedandready_to_merge, not task's five.IssueStatusvariant/COREorder follows it; generatedissue-status.tsregenerated.Node type sequence
Kind: core subtype (
issueextendstask), category unchanged. No field, relationship or rule added; thestatusfield's stored values and the effective order change. Docs:components/node-types.mdissue sheet and ADR-078's enum-extension section, pushed to nodespace-docsmainbefore merge.Tests
a_status_added_to_task_is_not_an_issues) now asserts the opposite (a_status_added_to_task_is_an_issues).bun run test:changedpasses (frontend, scripts, browser, types:check, node-types:check, Rust).🤖 Generated with Claude Code