Skip to content

form: add form layout descriptor to read path - #1033

Merged
gemmeren merged 3 commits into
Framework-R-D:mainfrom
wwuoneway:form-read-descriptor
Nov 2, 2026
Merged

gemmeren merged 3 commits into
Framework-R-D:mainfrom
wwuoneway:form-read-descriptor

Conversation

@wwuoneway

@wwuoneway wwuoneway commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The write path gained a layout descriptor in #1018 , but nothing can read it — i_storage_file only declares write_descriptor. This adds the read side, so a reader can ask a file which layout version and which technology it holds.

It adds read_descriptor() to the storage layer, along with the ROOT implementation.

Nothing consumes the descriptor yet; this is the prerequisite step for the navigation-aware read path.

  • Code: Added read_descriptor() to the storage reader and file interfaces. It returns an optional descriptor, distinguishing a missing descriptor from an empty one.
  • Code: Added ROOT descriptor reading. It reads the highest-cycle descriptor key, returns TNamed names and titles in order, and reports invalid descriptor objects or entries.
  • Code: Centralized file opening and settings in storage_reader. Descriptor reads and existing read operations use this helper.
  • Tests: Added coverage for descriptor absence and contents, malformed ROOT descriptors, and storage-reader behavior. Test execution results were not provided.

from_string() case-folded with an arithmetic range check ('A'..'Z' and
c - 'A' + 'a'), which assumes the alphabet is contiguous. C++ guarantees
that only for the decimal digits, so replace it with two tables matched
by position.

std::tolower is still avoided on purpose: it is locale-dependent, and a
technology token is part of the on-disk layout, so the same bytes must
name the same technology whatever locale a node happens to run under. It
also has undefined behaviour for a negative char, which from_string can
see because it parses both job configuration and descriptor contents.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c50d21c3-658f-4276-8aa7-747916c27317

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ccb493aa-03bb-40ef-a86c-09c1e0976d67
Commits

Reviewing files that changed from the base of the PR and between ad67a34 and a9e96eb.

Files selected for processing: 10
  • form/core/technology.hpp
  • form/root_storage/root_tfile.cpp
  • form/root_storage/root_tfile.hpp
  • form/storage/istorage.hpp
  • form/storage/storage_file.cpp
  • form/storage/storage_file.hpp
  • form/storage/storage_reader.cpp
  • form/storage/storage_reader.hpp
  • test/form/form_basics_test.cpp
  • test/form/form_storage_test.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 7
  • GitHub Check: Analyze cpp with CodeQL
  • GitHub Check: build (gcc, none, amd64, ubuntu-24.04)
  • GitHub Check: build (gcc, none, arm64, ubuntu-24.04-arm)
  • GitHub Check: CodeRabbit
  • GitHub Check: coverage (amd64)
  • GitHub Check: coverage (arm64)
  • GitHub Check: clang-tidy-check
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 1
Source excerpt: **Authoritative sources**: `.clang-format` and `.clang-tidy` are the ground truth for formatting and naming.

CodeRabbit inference engine (AGENTS.md)

Files:

  • form/core/technology.hpp
  • form/root_storage/root_tfile.hpp
  • form/storage/storage_file.cpp
  • form/storage/storage_file.hpp
  • form/storage/istorage.hpp
  • form/root_storage/root_tfile.cpp
  • test/form/form_basics_test.cpp
  • test/form/form_storage_test.cpp
  • form/storage/storage_reader.cpp
  • form/storage/storage_reader.hpp
Learnings: 1
Learning: 2026-11-02T15:37:36.740Z
Learnt from: CR
Repo: Framework-R-D/phlex PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-02T15:37:36.740Z
Learning: Applies to **/*.{hpp,cpp} : Source excerpt:
# Phlex — Kilo Agent Instructions

## Code Style and Formatting

### C++

- **Naming** (from `.clang-tidy` `readability-identifier-naming`):
  - All identifiers: `lower_case` — namespaces, classes, structs, enums,
    functions, variables, parameters, members, constants, type aliases
  - Exception: template parameters use `CamelCase`
  - Exception: macros use `UPPER_CASE`
  - Exception: executable names use hyphens (e.g. `phlex-program`)
  - Private, protected, and constant members get a trailing underscore (`_`)
  - No trailing underscore on anything else
  - *Note*: some older code uses PascalCase for classes — this was under
    discussion but `.clang-tidy` settles it as `lower_case`; new code must
    follow `.clang-tidy`, existing violations are being fixed incrementally

Applied to files:

  • form/storage/storage_reader.hpp
Cppcheck (2.22.0)
form/root_storage/root_tfile.cpp

[style] 86-86: The function 'read_descriptor' is never used.

(unusedFunction)

Additional comments: 8
form/storage/istorage.hpp: 1

7-7: LGTM!

Also applies to: 14-14, 44-51, 86-87

form/storage/storage_file.cpp: 1

5-5: LGTM!

Also applies to: 30-30

form/storage/storage_file.hpp: 1

8-8: LGTM!

Also applies to: 25-25, 30-30

form/root_storage/root_tfile.hpp: 1

9-9: LGTM!

Also applies to: 29-29

form/storage/storage_reader.hpp: 1

12-12: LGTM!

Also applies to: 16-16, 38-41, 44-47

form/root_storage/root_tfile.cpp: 1

10-10: LGTM!

Also applies to: 13-13, 15-15, 17-17, 86-125

test/form/form_storage_test.cpp: 1

30-30: LGTM!

Also applies to: 36-36, 43-43, 46-46, 140-155, 599-746

form/storage/storage_reader.cpp: 1

15-15: LGTM!

Also applies to: 65-88, 110-110, 114-114, 144-144, 152-152, 182-182, 186-186

Walkthrough

Technology name parsing now accepts ASCII case variations. Storage files and the storage reader expose optional descriptor reads. The ROOT backend reads and validates descriptor entries, while storage-reader file opening and configuration use a shared helper.

Changes: Technology Name Parsing

Layer / File(s) Summary
Case-insensitive technology parsing
form/core/technology.hpp, test/form/form_basics_test.cpp
from_string compares recognized names using ASCII-only case folding. Tests cover mixed-case names, rejected variations, and technology-token round-trips.

Storage Descriptor Reads

Layer / File(s) Summary
Optional descriptor API
form/storage/istorage.hpp, form/storage/storage_file.*, form/storage/storage_reader.hpp, form/root_storage/root_tfile.hpp, test/form/form_basics_test.cpp
Storage interfaces and storage_file expose optional descriptor values. The ROOT file and storage reader declarations add descriptor-read methods. Generic tests cover absent, populated, and empty descriptors.
ROOT descriptor read
form/root_storage/root_tfile.cpp, test/form/form_storage_test.cpp
root_tfile_imp reads the descriptor key, returns nullopt when it is absent, and validates the object type and list entries. Tests cover absent, empty, ordered, and invalid descriptors.
Storage reader integration
form/storage/storage_reader.cpp, test/form/form_storage_test.cpp
storage_reader centralizes file lookup, creation, settings, and caching in open_file. Descriptor reads and existing read operations use that helper. Tests cover descriptor contents, mixed ROOT backends, product reads, and file-open errors.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant storage_reader
  participant open_file
  participant root_tfile_imp
  storage_reader->>open_file: Resolve or create and configure file
  open_file-->>storage_reader: Return cached storage file
  storage_reader->>root_tfile_imp: Read descriptor
  root_tfile_imp-->>storage_reader: Return optional descriptor entries
Loading

Possibly related PRs

Suggested reviewers: aolivier23, gemmeren

Merge Risk: Minimal · previous review a9e96

No confirmed merge-blocking issue is established from the supplied evidence. Complete normal build and test checks before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "form: add form layout descriptor to read path" matches the main change. The PR adds read_descriptor() across the storage interfaces and the ROOT implementation, and it makes technology pars…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "form: add form layout descriptor to read path" matches the main change. The PR adds read_descriptor() across the storage interfaces and the ROOT implementation, and it makes technology parsing case-insensitive. The title names the core feature, which is the descriptor read path. It does not name the case-insensitive technology parsing, but the changeset does not center on that, so this omission is acceptable.

Full details: Docstring Coverage

Explanation

Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 10 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.89189% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
form/root_storage/root_tfile.cpp 87.50% 2 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #1033      +/-   ##
==========================================
- Coverage   89.65%   89.57%   -0.09%     
==========================================
  Files         177      177              
  Lines        5996     6006      +10     
  Branches      994      996       +2     
==========================================
+ Hits         5376     5380       +4     
- Misses        392      398       +6     
  Partials      228      228              
Flag Coverage Δ
amd64 89.57% <91.89%> (-0.09%) ⬇️
arm64 89.57% <91.89%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
form/storage/istorage.hpp 100.00% <ø> (ø)
form/storage/storage_file.cpp 100.00% <ø> (ø)
form/storage/storage_file.hpp 100.00% <ø> (ø)
form/storage/storage_reader.cpp 83.52% <100.00%> (+0.70%) ⬆️
form/storage/storage_reader.hpp 100.00% <ø> (ø)
form/root_storage/root_tfile.cpp 73.33% <87.50%> (+9.44%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce771e1...b62876d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wwuoneway

Copy link
Copy Markdown
Contributor Author

@coderabbitai Please open an issue to track separating the configuration spelling from the on-disk technology token.

The current technology_name() derives the on-disk token by lowercasing the configuration name. Ideally, these should be declared independently, with the descriptor parser using an exact match rather than case folding.

This is a follow-up design improvement and should be handled in a separate PR, not included in the current one.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Analysis chain

Script executed:

#!/bin/bash
set -euo pipefail
for endpoint in issues/1033/comments pulls/1033/comments; do
  gh api --paginate "repos/Framework-R-D/phlex/$endpoint" \
    --jq '.[] | select(.user.login == "wwuoneway") | select(.body | contains("Please open an issue to track separating the configuration spelling")) | {html_url, body}'
done

Length of output: 1023


Script executed:

#!/bin/bash
set -euo pipefail
gh issue create \
  --repo Framework-R-D/phlex \
  --assignee wwuoneway \
  --title "form: separate configuration names from on-disk technology tokens" \
  --body "$(cat <<'EOF'
## Summary

Declare configuration spellings and on-disk technology tokens independently. Use exact matching for technology tokens read from FORM descriptors, rather than case folding.

Requested by @wwuoneway as a follow-up to PR #1033. Implement this design improvement in a separate PR; do not expand the scope of #1033.

## Background and rationale

As described in the request, `technology_name()` currently derives the on-disk token by lowercasing the configuration name. This couples a persistent file-format identifier to configuration spelling.

Independent declarations make the file-format contract explicit. Exact descriptor-token matching avoids using configuration-name case folding to interpret persistent identifiers.

## Required changes

- Define the configuration spelling and canonical on-disk token independently for each technology.
- Update `technology_name()` and descriptor-writing code to use the explicit on-disk token, without deriving it by lowercasing a configuration name.
- Provide a distinct exact-match parsing path for descriptor technology tokens.
- Keep configuration-name parsing separate from descriptor-token parsing. Preserve intended configuration parsing behavior.
- Preserve existing canonical on-disk tokens so files written with those tokens remain readable.
- Add tests for explicit token mappings, descriptor-token round trips, exact-match rejection of case variants and unknown tokens, and configuration parsing behavior.

## Affected areas

- `form/core/technology.hpp`: technology names and parsing.
- FORM descriptor production and consumption in the storage/read path, including `form/storage/` and `form/root_storage/`.
- `test/form/form_basics_test.cpp` and `test/form/form_storage_test.cpp`: technology and descriptor tests.

Inspect callers of `technology_name()` to determine the complete implementation scope.

## Acceptance criteria

- Configuration spellings and on-disk technology tokens have independent declarations.
- Descriptor writers emit the explicit canonical tokens.
- Descriptor token parsing accepts only exact canonical matches and does not case-fold input.
- Existing canonical on-disk tokens remain supported.
- Configuration parsing remains independent and has regression coverage.
- Tests demonstrate token round trips and rejection of noncanonical descriptor tokens.
- The implementation is delivered in a separate PR from #1033.

## References

- Original PR: https://github.com/Framework-R-D/phlex/pull/1033
- Request from @wwuoneway: https://github.com/Framework-R-D/phlex/pull/1033#issuecomment-6585275794
EOF
)"

Length of output: 2994


@wwuoneway Created #1034 and assigned it to you.

The issue tracks independent configuration spellings and on-disk technology tokens, exact-match descriptor parsing, and regression tests. It links back to your request and specifies a separate PR from #1033.

You are interacting with an AI system.

aolivier23
aolivier23 previously approved these changes Nov 2, 2026

@aolivier23 aolivier23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread form/core/technology.hpp Resolved
gemmeren
gemmeren previously approved these changes Nov 2, 2026

@gemmeren gemmeren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small comment for you to consider.

@gemmeren
gemmeren enabled auto-merge November 2, 2026 20:51
@wwuoneway
wwuoneway dismissed stale reviews from gemmeren and aolivier23 via b62876d November 2, 2026 21:56
@wwuoneway

Copy link
Copy Markdown
Contributor Author

@coderabbitai please update #1034 to match what landed in #1033.

The case folding this issue was written against is no longer in the codebase. It was dropped during review of #1033: technology::from_string is back to exact matching and form/core/technology.hpp is unchanged by that PR.

What should change here:

  • The summary and rationale should no longer describe replacing case folding. There is none to replace. The actual gap is that there is no descriptor-token parsing path at all, and this issue adds one.

  • Still accurate and still the core of the issue: technology_name() in form/core/container_naming.hpp derives the on-disk token by lowercasing the configuration spelling, coupling a persistent format identifier to a configuration name.

  • The acceptance criterion "does not case-fold input" is now trivially satisfied. Please keep it as a constraint on the new parsing path rather than as a change to existing behaviour.

  • Please add that the on-disk spellings are already pinned in test/form/form_basics_test.cpp, in the section "a navigation name carries the technology that wrote it". Any explicit token declarations must agree with root_ttree, root_rntuple and generic.

Everything else stands: independent declarations, exact-match descriptor parsing, keeping configuration parsing separate, and preserving the existing on-disk tokens.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Analysis chain

Script executed:

#!/bin/bash
set -euo pipefail
gh issue view 1034 --repo Framework-R-D/phlex --json title,body,url
for file in form/core/container_naming.hpp form/core/technology.hpp test/form/form_basics_test.cpp; do
  ast-grep outline "$file" --items all || true
done
rg -n -C 12 'technology_name|from_string|a navigation name carries the technology that wrote it|root_ttree|root_rntuple|"generic"' form/core/container_naming.hpp form/core/technology.hpp test/form/form_basics_test.cpp

Length of output: 65098


Script executed:

#!/bin/bash
set -euo pipefail
body=$(cat <<'EOF'
## Summary

Declare configuration spellings and on-disk technology tokens independently. Add a distinct exact-match parsing path for technology tokens read from FORM descriptors.

Requested by @wwuoneway as a follow-up to PR #1033. Implement this design improvement in a separate PR; do not expand the scope of #1033.

## Background and rationale

The case-folding change proposed during review of #1033 was dropped. `technology::from_string()` uses exact matching for configuration spellings, and `form/core/technology.hpp` is unchanged by that PR. There is no existing descriptor-token parsing path. This issue adds that path; it does not replace case folding in an existing parser.

`technology_name()` in `form/core/container_naming.hpp` derives on-disk tokens by lowercasing and sanitizing the configuration spelling returned by `technology::to_string()`, with an explicit special case for `generic`. This couples a persistent file-format identifier to a configuration name.

Independent declarations make the file-format contract explicit. A separate descriptor-token parser can interpret that contract without changing configuration parsing.

The existing on-disk spellings are already pinned in `test/form/form_basics_test.cpp`, in the section "a navigation name carries the technology that wrote it":

- `root_ttree`
- `root_rntuple`
- `generic`

Any explicit token declarations must agree with these spellings.

## Required changes

- Define configuration spellings and canonical on-disk tokens independently.
- Update `technology_name()` and descriptor-writing code to use explicit on-disk tokens, without deriving them by lowercasing configuration spellings.
- Add a distinct exact-match parsing path for descriptor technology tokens.
- Do not case-fold input in the new descriptor-token parsing path. This is a constraint on the new path, not a change to existing parser behavior.
- Keep configuration-name parsing separate from descriptor-token parsing. Preserve the existing exact-match configuration parsing behavior.
- Preserve the existing canonical on-disk tokens, including `root_ttree`, `root_rntuple`, and `generic`, so files written with those tokens remain readable.
- Add tests for explicit token mappings, descriptor-token round trips, rejection of case variants and unknown descriptor tokens, and unchanged configuration parsing behavior.

## Affected areas

- `form/core/container_naming.hpp`: `technology_name()` and physical-name token production.
- `form/core/technology.hpp`: configuration names and parsing; keep configuration parsing independent of the new descriptor-token API.
- FORM descriptor production and consumption in the storage/read path, including `form/storage/` and `form/root_storage/`.
- `test/form/form_basics_test.cpp`: existing pinned on-disk spellings and technology tests.
- `test/form/form_storage_test.cpp`: descriptor tests.

Inspect callers of `technology_name()` to determine the complete implementation scope.

## Acceptance criteria

- Configuration spellings and on-disk technology tokens have independent declarations.
- Physical-name and descriptor writers use the explicit canonical tokens.
- A new descriptor-token parsing path accepts only exact canonical matches. It must not case-fold input.
- Explicit token declarations agree with `root_ttree`, `root_rntuple`, and `generic` as pinned by "a navigation name carries the technology that wrote it" in `test/form/form_basics_test.cpp`.
- Existing canonical on-disk tokens remain supported.
- Configuration parsing remains separate and retains its existing exact-match behavior, with regression coverage.
- Tests demonstrate descriptor-token round trips and rejection of noncanonical case variants and unknown tokens.
- The implementation is delivered in a separate PR from #1033.

## References

- Original PR: https://github.com/Framework-R-D/phlex/pull/1033
- Original request from @wwuoneway: https://github.com/Framework-R-D/phlex/pull/1033#issuecomment-6585275794
- Scope correction requested by @wwuoneway in the discussion of PR #1033.
EOF
)
gh issue edit 1034 --repo Framework-R-D/phlex --body "$body"
saved_body=$(gh issue view 1034 --repo Framework-R-D/phlex --json body --jq .body)
if [[ "$saved_body" != "$body" ]]; then
  printf '%s\n' 'Verification failed: saved issue body differs from requested body.' >&2
  exit 1
fi
printf '%s\n' 'Verified: issue #1034 contains the corrected body.'
gh issue view 1034 --repo Framework-R-D/phlex --json title,url

Length of output: 4910


@wwuoneway Updated #1034 and verified the saved issue body.

  • Removed the outdated rationale about replacing case folding.
  • Clarified that the issue adds a new descriptor-token parsing path.
  • Kept exact matching without case folding as a constraint on that new path.
  • Identified technology_name() in form/core/container_naming.hpp as the source of the configuration-name coupling.
  • Added the existing test section and its pinned tokens: root_ttree, root_rntuple, and generic.

The issue still requires independent declarations, separate configuration parsing, preserved on-disk tokens, and implementation in a separate PR.


Learnings added — pending approval
Learnt from: wwuoneway
URL: https://github.com/Framework-R-D/phlex/pull/1033

Timestamp: 2026-11-02T22:07:35.353Z
Learning: Within repository "Framework-R-D/phlex", only for files matching one of ["form/core/container_naming.hpp","test/form/form_basics_test.cpp"]: When reviewing changes to technology_name() in form/core/container_naming.hpp or its token expectations in test/form/form_basics_test.cpp, check that explicit on-disk technology token declarations preserve root_ttree, root_rntuple, and generic, as pinned by the section "a navigation name carries the technology that wrote it". Do not change these persistent spellings to follow configuration-name changes.

These changes will be applied once approved by an admin.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

Comment thread test/form/form_storage_test.cpp Resolved

@aolivier23 aolivier23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just make sure tests are passing please. One of them looked a little suspicious to me on first glance, and I left a comment.

@gemmeren
gemmeren merged commit e9412d4 into Framework-R-D:main Nov 2, 2026
46 checks passed
@wwuoneway
wwuoneway deleted the form-read-descriptor branch November 2, 2026 22:34
gemmeren pushed a commit that referenced this pull request Nov 5, 2026
A technology's on-disk token was derived by lowercasing its configuration
spelling, tying a persistent file-format identifier to a user-interface
string: renaming a configuration name would silently have changed what FORM
writes to disk. There was no parser in the other direction either, so the
descriptor read back in #1033 could not be turned into a technology::id.

Declare both spellings in one constexpr registry in core/technology.hpp,
holding each technology's id, configuration name, on-disk token and whether
FORM implements it. Every lookup and both parsers derive from that table.

Add a separate exact-match parsing path for on-disk tokens: on_disk_token(),
find_on_disk_token() and from_on_disk_token().
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.

3 participants