Files
ARCADIA-Studio/harness/release-analysis-context-experiment-20260911.md
T

13 KiB
Raw Blame History

Executed comparison of baseline values and complete analysis cases

Codex-956atf /root/semantics_critic, 2026-09-11. Root assigned this bounded follow-up to the paired semantic review. Read current Gitea issue #1 through #117; announced ownership in #120. Owned only harness/experiments/analysis-context-20260911/ and this report. Existing proposals, review, production and ledgers were untouched. Root approved the isolated std-only direct-rustc command; no Cargo, target, native application or package changes occurred.

Result and recommendation

Prefer B for the next engineering-study prototype: explicit baseline property values/formulas plus one level of named case overrides. In this controlled maintenance task it produces identical results with materially less repeated authored state. Preserve an explicit complete frozen snapshot operation for studies that must stop following the baseline. D remains useful as that independent snapshot form and for studies deliberately maintaining unrelated assumptions.

This recommendation is based on executed semantic examples and text counts, not a measured human usability study or a final metamodel decision. A visible baseline, effective-case formula evaluation, distinguishable Missing/Clear operations, captured revision/provenance and complete freeze semantics are necessary conditions. Removing any of those to make B look simpler reintroduces concrete ambiguity demonstrated below.

Method

The standalone program generates and parses a small closed experiment dialect. B and D use the same property identities represented by stable symbols, same expression AST, pure function definitions, dependency checks and evaluator. B resolves an explicitly named baseline plus local overrides; D requires each selected case's complete bindings. There is no UI-selected or unnamed default case and no case-to-case inheritance. Both can evaluate unknown inputs without inventing zero.

Twenty fixed inputs are each 1,000 ms. Cases 1–20 have two varying inputs:

varying01 = 750 + 50 * (case_number - 1) ms
varying02 = 1000 + 25 * (case_number - 1) ms
total = sum(all 22 inputs)
budget = total <= 22000 ms

The independent arithmetic expectation is total = 21750 + 75 * (case_number - 1) ms. Cases 1–4 satisfy the check; case 20 gives 23,175 ms and violates it. B's first case explicitly names the baseline and overrides nothing; the other 19 override the two varying inputs. D contains all 22 input bindings in every case. Both also have result and check bindings.

Each context model is tested with inline expressions and with shared pure reusable calculations, so D is not penalized merely for repeating the threshold expression. Factored calls bind all arguments explicitly; definitions do not capture project properties. All accepted emitted source is parsed/validated and round-tripped to exact experiment AST equality. Deliberately invalid source is emitted separately as *.rejected-study.

Changes are made programmatically to the experimental AST and emitted as complete text, then parsed again. The experiment counts literal changed source lines using longest common subsequence. It does not count those changes as human actions, claim the syntax is Studio's, or pretend a generated source edit is an observed engineering task.

Executed measurements

Final results: 218 assertions passed, process exit 0.

Variant Initial lines UTF-8 bytes Binding rows Change one shared fixed assumption: removed/added lines Change threshold: removed/added lines
B, inline 106 2,281 62 3 / 3 3 / 3
B, factored 108 2,781 62 3 / 3 2 / 2
D, inline 522 13,241 480 21 / 21 21 / 21
D, factored 524 14,026 480 21 / 21 2 / 2

The fixed-assumption task changes fixed01 from 1,000 to 1,200 ms across the active study. B edits one binding plus baseline/document revision lines. D edits twenty bindings plus its document revision line. Both correctly add 200 ms to every case and reduce the passing cases from four to one.

For the threshold task, changing 22,000 to 22,500 ms yields eleven passing cases in every variant. B-inline changes one baseline predicate. D-inline changes twenty predicates. Factoring the predicate removes that difference: B-factored and D-factored each change one function body and one document revision. This falsifies a blanket claim that D necessarily repeats every formula edit. It does not remove D's repeated fixed input values; factoring also increases initial text because the calls and parameter lists remain explicit.

Binding counts include the result and check. B has 24 baseline bindings and 38 override bindings; D has 20 × 24 = 480. The common property catalog is counted in emitted line/byte size. OA/SA subjects, labels, UUIDs and full type declarations are outside the experiment; these numbers cannot be substituted for complete product-source size.

Concrete semantic counterexamples

Operation or mistake Executed B result Executed D result Implication
Change one fixed assumption for the whole active study One baseline binding affects all twenty cases. All twenty bindings must change; a negative control editing only the first changes only that case. B reduces maintenance duplication. D's local isolation is useful when the cases intentionally represent independent assumptions. An atomic bulk editor could reduce D's actions, but not the duplicated source state.
Evaluate an inherited formula in its definition context Wrong baseline context gives 21,750 ms for case 20; correct effective-case context gives 23,175 ms. Complete case expressions use their selected case's inputs directly. B must resolve all property reads in the requested case, even when the formula originated in the baseline. “Inherit the already evaluated baseline result” is incorrect.
Set the varying input override to missing It shadows the known baseline input. Dependent total/check become Missing, with varying01 as cause. An explicit missing row also propagates Missing. Missing is a real authored state, not an absent override or a false predicate.
Remove that row B clears the override and restores the baseline's 750 ms. Case 20 total becomes 22,225 ms. A required missing binding row is a structural rejection. Commands and text must distinguish Clear/Use baseline from Set missing. The same absent-map representation must not mean both.
Clear an override whose baseline itself is missing Result stays Missing; no fallback value is invented. Not an inheritance operation. B resolution terminates at one explicit baseline. It must not search another case or a payload default.
Override varying01 = total Effective case graph rejects a cycle, even though the baseline graph was valid. The equivalent complete case also rejects. B cannot validate only the baseline and override fragments independently. Dependency checks must see the fully resolved case.
Point a case at another case Rejects case-to-case inheritance. Inheritance is forbidden. This experiment's B benefit does not require a general inheritance graph.
Copy a case and call it frozen A shallow case copy still follows later baseline changes. Inline D's complete copy remains independent; factored D still follows changed shared function bodies. A freeze contract must capture the definition environment as well as values/formulas. D's complete input rows alone are insufficient once reusable definitions exist.
Use a project property inside a supposedly pure function Rejected. Rejected. Reuse does not secretly capture a current case, which would change the comparison. Recursive definitions also reject.

The program explicitly calculates both the correct effective-case result and the wrong baseline-context value as a negative control. It does not implement the wrong behavior as an alternative acceptable evaluator.

Frozen studies and provenance

The experiment's freeze operation creates a complete independent D-style document containing the selected case's effective bindings, expression ASTs, the copied pure definition environment, captured input/formula row origins and original document/baseline revision identity. It keeps explicit Missing inputs. Changes to the original baseline and threshold functions leave the frozen observation unchanged. The frozen file parses and reproduces its exact experimental state without access to the original active study.

See frozen B case 20 and active B provenance. The latter identifies fixed inputs and result/check formulas as baseline:engineering@1 via case20, and varying inputs as case:case20. Frozen observations retain their captured origins with an explicit frozen: marker. All 24 effective bindings retain an origin.

This is intentionally a larger snapshot than an active B case. Freezing removes future propagation by capturing actual dependencies; it cannot honestly be reduced to a copied case name or cached result. Both the fixed input and pure definition changes were applied after capture. Inline D already has isolated values/formulas, which is its clearest advantage; shared calculation definitions introduce the same capture obligation for D.

The experiment's provenance strings are observations produced by the fixture/evaluator, not a secure import or history authority. Production provenance still needs stable typed identities, exact accepted document/source references and validated snapshot origin. The program does not test UUID renaming, package trust, artifact identity or historical remapping.

Remaining counterexamples and conditions on the recommendation

  1. Propagation is a visible engineering decision. In B, the source of an unchanged case can remain byte-identical while its result changes after a baseline edit. Before adopting B, the native/source workflows must expose the named base and show the affected cases or result revision. A cache keyed only by a case's own text would be invalid. The experiment supplies document/baseline provenance but does not test a real asynchronous UI cache.
  2. Frozen evidence must capture external definitions. The experiment copies its complete small function environment. Real units/calculations imported from packages need exact pins and retained bytes. A frozen binding graph referring to mutable ambient definitions remains live, whichever context model is chosen.
  3. Thresholds can be factored in D. The comparison supports B's reduction of repeated assumptions; it does not establish that D always repeats computation definitions. Avoid justifying B with that stronger, falsified claim.
  4. Independent studies may prefer D. If the twenty fixed assumptions are intentionally independent measurements rather than one shared design assumption, B's propagation is unwanted. Explicit independent/frozen studies cover that use case; silently turning every case into a live override would be misleading.
  5. Actual authoring remains unmeasured. A visible “Use baseline” control might be clearer than twenty copied values, or engineers may misunderstand inherited formulas. The next native/text task must measure wrong-context changes, recovery and comprehension. This experiment cannot provide human timings, UI clarity, large-project latency or accessibility evidence.
  6. Metamodel integration is still open. Subject ownership, OA/SA transitions, library pattern closure, check identity, quantity compatibility and source normalization require root's paired-contract decisions. The tiny interpreter is not a substitute for those contracts. Do not import it into production merely because its examples pass.

The narrow conclusion is that one-level explicit B is a stronger active-study candidate than compulsory complete-case D for shared-assumption maintenance. A complete independent snapshot remains useful. This yields a concrete next prototype, not an argument for arbitrary inheritance or hidden defaults.

Exact execution evidence and reproduction

  • Compiler: rustc 1.98.1 (48a229cea 2026-09-01), commit 48a229ceaefd4985c50990b14116b6d856af0985, host x86_64-pc-windows-gnullvm, LLVM 22.1.8.
  • Compile: std-only rustc --edition=2024 -D warnings -C linker=clang.exe; no warnings or errors in the completed final build.
  • Final program SHA256: 5632ACAFD06413DCC9961DDC1ADE60C7556FB56B43ED3C667F5106E7559A3733.
  • Executable: .local/analysis-context-20260911/analysis-context.exe; SHA256 36E2D5A7F0683CC19F2EB50CA4840F3A793A8350498E3E17EDD75710A78FC675.
  • Results SHA256: 248419751E9B836CDE6D80F97202843DD5DC085D1BEC67CB2FCC5046960C143B.
  • Final process exit: 0; 218 assertions passed. Each assertion count is an experiment check, not a count of independent production tests.
  • Evidence manifest records all 29 emitted source fixture hashes, commands and UTC recording time. README gives the complete repeatable commands.

All runtime outputs are confined to the owned experiment directory, with the executable isolated under .local. Existing Studio tests and release acceptance were not rerun or claimed by this task. Root retains the final semantic choice and implementation ownership.