Skip to content

ADR-0076: A directly editable field is a closed enumeration, not a generic patch - #34

Open
nguyenngothuong wants to merge 1 commit into
votrongdao:devfrom
diginno-net:adr/record-field-edit-is-a-closed-enumeration
Open

ADR-0076: A directly editable field is a closed enumeration, not a generic patch#34
nguyenngothuong wants to merge 1 commit into
votrongdao:devfrom
diginno-net:adr/record-field-edit-is-a-closed-enumeration

Conversation

@nguyenngothuong

Copy link
Copy Markdown

ADR only — no implementation, per CONTRIBUTING.md: a rejected ADR costs an hour, a rejected implementation costs a week.

Why I am asking

I want to add inline editing to the record page — click a value, change it, save. Before writing any of it: on this build nothing edits a built-in column, and EditFieldsDrawer says so in its own header rather than leaving it to be discovered. Reading around it, that looks deliberate — every write to a built-in entity is an intent flow, which is ADR-0001 holding.

So the design question is not the UI. It is whether this platform should acquire a generic write, and I think the answer is no.

What it proposes

One flow, crm.record.field.set, over an EditableColumn enumeration the compiler sees the whole of. Configuration selects which pair and what value; it cannot add a pair.

That is not a new pattern here — it is the division already drawn in 26 §7.3 for configured processes, where an administrator rewrites transitions while the action kinds stay closed and ProcessPublishing.Validate refuses an unknown one. I have applied the same shape to columns rather than inventing a second one.

The rule for what goes in the enumeration: a column is in it when changing it means the previous value was wrong, and out of it when changing it means something happened. The second is an intent and keeps its flow. So account.name and contact.email are in; opportunity.stage is not.

The part I would most like challenged is the fitness function: a pair in the enumeration that is also reachable through an intent flow fails the build. Without that, this decays into the generic patch it exists to refuse, over about a year. I would rather that check be wrong now than absent.

What it deliberately does not do

  • No generic record.patch, for the reason in the Context section — the manifest would describe an application that is not the one running, which is the guarantee in 13-AI-Native failing for every entity with a guarded column.
  • No new validation language: it evaluates the tenant’s existing custom_validation_rule set through GuardOperator.
  • No new history table: custom_field_history already has the right shape and today only ever holds a custom column.
  • Nothing about retention, which the change feed and the journal share and none of the three answer.

If this is accepted

Implementation would come as its own PR — enumeration, diagnostic FLOWX1035, fitness function, capability, tests first, docs/26 updated in the same PR. If it is rejected I would like to know whether it is the closed enumeration you object to or inline editing at all, since the second answer saves me proposing a variation on the first.

Also happy to be told this belongs behind the manifest v1.0 freeze; it adds no manifest field, which is why I did not assume so.


Signed off under the DCO. One file plus its index row.

A record page shows values and offers no way to change one. `EditFieldsDrawer` writes
custom fields and states in its own header that no built-in column has a write on this
build — which is true, and true on purpose: every write to a built-in entity is an intent
flow, because ADR-0001 holds that "set column to value" is not a unit of business meaning.

Some values, though, are just values. A misspelt company name is not an event, and a
platform whose answer to a typo is a new capability is one whose capability count tracks
its users' spelling. So the question is not whether a field may be edited directly, but
who decides which ones and when that decision is checked.

This proposes the division already drawn for configured processes in 26 §7.3, applied to
columns: configuration selects which pair and what value, and cannot add a pair. One flow,
`crm.record.field.set`, over an `EditableColumn` enumeration the compiler sees the whole
of; a diagnostic when a member names a column `Describe` does not answer for; a fitness
function refusing any pair also reachable through an intent flow, which is the
two-ways-to-write defect that rules out a generic patch.

It reaches `field_policy` and the tenant's validation rules — both of which exist and
neither of which anything in the sample writes through today — journals to
`custom_field_history`, and emits `record.field.changed`.

No code. The ADR first, per CONTRIBUTING: a rejected ADR costs an hour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: nguyenngothuong <nguyenthuongtb12@gmail.com>
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