Repository navigation
Conversation
Route and output labels are now opaque strings matched exactly everywhere: data, metadata, error models and the simulator. Numeric names such as `1` are plain names with no relationship to declaration order, and `input_<n>` / `outeq_<n>` are ordinary identifiers. - DSL: accept integer literals wherever a route or output name goes and keep their source text; drop the bare-numeric and wrong-prefix rejections and the NUMERIC_*_PREFIX constants. - Metadata and DSL runtime: resolve routes and outputs by exact match only, with no alias or positional fallback. - Macros: match numeric labels by literal text and require plain decimal digits. - Error models: AssayErrorModels and ResidualErrorModels bind labels by exact output name; numeric labels are no longer dense slots. - Pmetrics: normalize zero-fraction integers such as `1.0` to `1`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V2wvK41uHMvzuFJmZeM6PY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V2wvK41uHMvzuFJmZeM6PY
- Inline the runtime's output-label wrapper and reword the route resolution comment. - Drop ValidatedModelMetadata::route_by_kind, now identical to route_for_label, and fold output_index into output_for_label. - Compare InputLabel/OutputLabel with usize as text, so "01" != 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V2wvK41uHMvzuFJmZeM6PY
The JSON model module it described was removed in #252. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V2wvK41uHMvzuFJmZeM6PY
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #383 +/- ##
==========================================
+ Coverage 84.75% 85.18% +0.43%
==========================================
Files 78 78
Lines 35818 35771 -47
==========================================
+ Hits 30356 30470 +114
+ Misses 5462 5301 -161
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Residual-model accessors lack public binding, and CSV normalization can silently change labels during round trips.
2 open findings
What changed in this PR
Removes numeric label prefixes across model authoring and simulation, using exact names for route, output, and error-model binding.
Changes:
- Accepts numeric labels directly in macros and the DSL.
- Removes prefix aliases and adds label-based residual-model binding.
- Updates regression tests and normalizes float-formatted integer CSV labels.
| File | Description |
|---|---|
| tests/test_pf.rs | Uses named assay output. |
| tests/support/bimodal_ke.rs | Uses unprefixed runtime route. |
| tests/ode_optimizations.rs | Uses named assay output. |
| tests/ode_macro_lowering.rs | Tests numeric-label lowering. |
| tests/numeric_labels.rs | Adds cross-backend label tests. |
| tests/bolus_reinit_stop_time.rs | Migrates regression fixtures. |
| tests/authoring_parity_corpus.rs | Updates authoring parity cases. |
| src/simulator/likelihood/subject.rs | Updates dense-slot test setup. |
| src/simulator/likelihood/prediction.rs | Updates dense-slot test setup. |
| src/simulator/likelihood/mod.rs | Binds residual models before scoring. |
| src/simulator/likelihood/matrix.rs | Updates dense-slot test setup. |
| src/simulator/equation/sde/mod.rs | Tests exact label resolution. |
| src/simulator/equation/ode/mod.rs | Tests exact label resolution. |
| src/simulator/equation/mod.rs | Documents label resolution rules. |
| src/simulator/equation/metadata.rs | Removes numeric alias resolution. |
| src/simulator/equation/analytical/mod.rs | Tests exact label resolution. |
| src/dsl/runtime.rs | Updates runtime label tests. |
| src/dsl/model_info.rs | Tests numeric metadata names. |
| src/dsl/jit.rs | Updates compiled-model label tests. |
| src/dsl/backend.rs | Removes runtime route aliases. |
| src/data/residual_error.rs | Adds label-keyed residual models. |
| src/data/parser/pmetrics/mod.rs | Normalizes integer decimal labels. |
| src/data/event.rs | Compares labels as text. |
| src/data/error_model.rs | Enforces exact assay-label binding. |
| schemas/model-v2.json | Deletes model schema. |
| pharmsol-macros/src/symbols.rs | Preserves numeric literal text. |
| pharmsol-macros/src/input/sde.rs | Updates numeric route tests. |
| pharmsol-macros/src/input/ode.rs | Updates shared-route tests. |
| pharmsol-macros/src/input/analytical.rs | Updates numeric route tests. |
| pharmsol-macros/src/analysis.rs | Maps label text to dense slots. |
| pharmsol-dsl/tests/ode_rhs_inputs.rs | Tests shared numeric routes. |
| pharmsol-dsl/tests/frontend_hardening.rs | Updates invalid-label case. |
| pharmsol-dsl/tests/dsl_authoring_edge_cases.rs | Tests numeric names and round trips. |
| pharmsol-dsl/src/parser.rs | Parses numeric labels verbatim. |
| pharmsol-dsl/src/lib.rs | Removes prefix constants. |
| pharmsol-dsl/src/execution.rs | Tests numeric execution metadata. |
| pharmsol-dsl/src/authoring.rs | Removes prefix restrictions. |
| pharmsol-dsl/src/analyze.rs | Removes prefix validation. |
| benches/common/mod.rs | Uses named residual output. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| && integer.bytes().all(|byte| byte.is_ascii_digit()) | ||
| && fraction.bytes().all(|byte| byte == b'0') => | ||
| { | ||
| integer.to_string() |
| /// `outputs` are the equation's declared output names in slot order. When | ||
| /// it is empty (an equation without metadata), labels are dense slot | ||
| /// numbers. | ||
| pub(crate) fn bind_output_names(&self, outputs: &[String]) -> Result<Self, ErrorModelError> { |
Contributor
|
| Project | pharmsol |
| Branch | remove-label-prefixes |
| Testbed | mhovd-pgx |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
🚨 2 Alerts
🐰 View full continuous benchmarking report in BencherThis branch has not been deployed
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.

INPUT and OUTEQ are now parsed exactly as they come, never appending input_ or outeq_ to them.