feat(deploy,auth): warn when the V2 assertion spec is unsupported - #118
Merged
Conversation
app.phylax.systems (Linea) runs the V1 assertion spec, so assertions written against the V2 triggers and precompiles either get rejected or deploy and never fire. Both cases were silent until now. `pcl deploy` scans the assertion sources listed in credible.toml for V2-only identifiers and warns when the target is that platform or a Linea chain, naming the files and markers. It prints before the protocol-manager step (nothing mutated yet) and again with the result, and machine output carries it in `data.warnings`. It never blocks a deploy: the platform decides what it accepts, and a stale marker list must not stop a release. `pcl auth login` warns up front when the login target is that platform, so the constraint is known before any assertion is written. Detection deliberately reads only the project's own sources, not the flattened output: a V2-capable credible-std declares those identifiers whether or not an assertion uses them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mateo-mro
reviewed
Jul 27, 2026
mateo-mro
previously approved these changes
Jul 27, 2026
makemake-kbo
enabled auto-merge (squash)
July 27, 2026 09:53
The marker list stopped short of several APIs credible-std places under its V2 section headers -- watchAnomaly, ph.anomalyContext, ph.store, ph.changedMappingKeys, the math precompiles, the mapping-tracing and flow-rate reads, and the V2-only structs. An assertion using only one of them deployed to a V1 platform unwarned, which is the exact miss the check exists to catch. The lists now mirror the full surface, and `v2_surface_is_covered` pins them to a table of representative call sites so a new V2 API cannot land in only one of the two places. `ph.load` stays out on purpose: the V1 and V2 overloads share a name. Scanning tracked a path only once it produced a finding, so one shared V1 source referenced by twenty contracts was read twenty times. Path deduplication moves into `unique_assertion_paths`, ahead of the read, so startup scales with unique files rather than references.
mateo-mro
reviewed
Jul 27, 2026
Two review points: - The pre-deploy warning was printed after step 1, so for a new project it landed only once the create POST had succeeded and credible.toml had been rewritten. It now prints before step 1 using the platform and the requested chain; the post-resolve pass still runs for an existing project (whose chain is only known after the fetch) but no longer reprints. - The source scanner had no string state: a literal holding `/*` blanked the rest of the file and a literal holding a V2 call read as usage. Literals are now blanked with their quotes preserved, escapes included. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fredo
reviewed
Jul 27, 2026
fredo
reviewed
Jul 27, 2026
mateo-mro
reviewed
Jul 27, 2026
mateo-mro
reviewed
Jul 28, 2026
mateo-mro
approved these changes
Jul 28, 2026
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.
Why
app.phylax.systems(Linea) runs the V1 assertion spec. Assertions written against the V2 triggers and precompiles either get rejected at release time or deploy and never fire — and pcl said nothing about it either way.What
pcl deployscans the assertion sources listed incredible.tomlfor V2-only identifiers (V2 triggers, fork helpers, fork-aware reads, protection-suite precompiles, cumulative-flow circuit breakers,PhEvm.ForkId/TriggerContext) and warns when the target is that platform or a Linea chain (59144 / 59141):It prints before the protocol-manager step — nothing mutated yet, so Ctrl-C is still free — and again with the result, since a long deploy scrolls the first one away. Machine output carries it in
data.warnings(also on--dry-run) withcode: assertion_spec.v2_unsupportedplus the per-file marker list. It never blocks a deploy: the platform decides what it accepts, and a stale marker list must not be the reason a release stops.pcl auth loginwarns when the login target is that platform, so the constraint is known before any assertion gets written. Human mode prints it after the login result; machine mode attaches awarningsarray to the login envelope (short-circuit,--no-waitchallenge, JSONL terminal event, andauth poll).Detection
Only the project's own assertion sources are read, never the flattened output: a V2-capable
credible-stddeclares every V2 identifier whether or not an assertion calls it, so flattened source would warn on every project. Comments are stripped, matches need an identifier boundary and a call/type shape, and unreadable files are skipped — a warning check must never fail a deploy.Heuristic, so it can miss V2 usage that lives in a project-local helper file rather than the declared assertion file. Both directions are recoverable because the outcome is only a warning.
Not included
pcl applyalso creates releases and shares the payload builder, but the ask was deploy + login; say the word and it's a three-line addition there.Testing
make ciequivalents green:cargo fmt --check, clippy pedantic,cargo check --features full(dev + release), full test suite,cargo doc, agent-smoke.pcl deploy --dry-run(human +--json) against a V2-marker fixture on production vs. a V2-capable platform vs. a V1 fixture, andpcl auth login(human +--json) against production vs. a custom platform.🤖 Generated with Claude Code