From 26ac5c65a0305674e47ea90b8fa311b1b70a2158 Mon Sep 17 00:00:00 2001 From: jpe7s Date: Tue, 22 Sep 2026 12:46:39 -0500 Subject: [PATCH 1/4] fix(ix-proxy): map a source shorter than the index map when the missing tail is dropped A client that follows a codama IDL's omitted optional-account strategy leaves an absent trailing optional account out entirely (the Stake program's lockup authority), so the source arrives with fewer accounts than the index map covers. The proxy sized the mapped array by the difference and read past the accounts it was given, an ArrayIndexOutOfBoundsException. It now maps what arrives when every missing position is one the map drops, and refuses by message when it would have to seat an account it was not given; accounts beyond the map still pass through as remaining accounts. --- .../systems/glam/ix/proxy/IxProxyRecord.java | 17 +++- .../proxy/OmittedTrailingAccountsTests.java | 97 +++++++++++++++++++ 2 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java diff --git a/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java b/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java index da25875..982da00 100644 --- a/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java +++ b/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java @@ -44,7 +44,17 @@ public Instruction mapInstructionUnchecked(final AccountMeta readCpiProgram, final Instruction instruction) { final var accounts = instruction.accounts(); final int numAccounts = accounts.size(); - final int numExtraAccounts = numAccounts - indexes.length; + // A source may arrive shorter than the index map: a client leaves an absent trailing + // optional account out under the omitted strategy. Each missing position must be one the + // map drops; one the proxy seats has no account to seat. + for (int s = numAccounts; s < indexes.length; ++s) { + if (indexes[s] >= 0) { + throw new IllegalStateException(String.format( + "Instruction supplies %d accounts, but the proxy seats account %d at index %d.", numAccounts, s, indexes[s] + )); + } + } + final int numExtraAccounts = Math.max(0, numAccounts - indexes.length); final var mappedAccounts = new AccountMeta[this.numAccounts + numExtraAccounts]; for (final var dynamicAccount : dynamicAccounts) { @@ -65,7 +75,8 @@ public Instruction mapInstructionUnchecked(final AccountMeta readCpiProgram, // the proxy program, flags preserved. A real account in the slot passes through. final var srcProgramId = instruction.programId().publicKey(); int s = 0, m; - for (; s < indexes.length; ++s) { + final int mapped = Math.min(indexes.length, numAccounts); + for (; s < mapped; ++s) { m = indexes[s]; if (m >= 0) { final var account = accounts.get(s); @@ -77,7 +88,7 @@ public Instruction mapInstructionUnchecked(final AccountMeta readCpiProgram, // Copy extra accounts. m = this.numAccounts; - for (; s < numAccounts; ++s, ++m) { + for (s = indexes.length; s < numAccounts; ++s, ++m) { mappedAccounts[m] = accounts.get(s); } diff --git a/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java b/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java new file mode 100644 index 0000000..12ac0d2 --- /dev/null +++ b/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java @@ -0,0 +1,97 @@ +package systems.glam.ix.proxy; + +import org.junit.jupiter.api.Test; +import software.sava.core.accounts.PublicKey; +import software.sava.core.accounts.meta.AccountMeta; +import software.sava.core.tx.Instruction; +import systems.comodal.jsoniter.JsonIterator; + +import java.util.HashMap; +import java.util.List; +import java.util.function.Function; + +import static org.junit.jupiter.api.Assertions.*; + +/// A source instruction may arrive with fewer accounts than the index map covers: under the +/// omitted optional-account strategy a client leaves an absent trailing optional out +/// entirely (the Stake program's lockup authority). The proxy maps what arrives when every +/// missing position is one the map drops, and refuses by message when it would have to seat +/// an account it was not given. +final class OmittedTrailingAccountsTests { + + private static final PublicKey CPI_PROGRAM = key(30); + private static final AccountMeta READ_CPI_PROGRAM = AccountMeta.createRead(CPI_PROGRAM); + private static final AccountMeta INVOKED_PROXY = AccountMeta.createInvoked(key(31)); + private static final AccountMeta FEE_PAYER = AccountMeta.createFeePayer(key(32)); + private static final PublicKey STATIC_BEFORE = key(33); + private static final PublicKey STATIC_AFTER = key(34); + private static final Function> FACTORY = + DynamicAccountConfig::createFeePayerAccount; + + private static PublicKey key(final int marker) { + final byte[] bytes = new byte[PublicKey.PUBLIC_KEY_LENGTH]; + bytes[0] = (byte) marker; + return PublicKey.createPubKey(bytes); + } + + /// Proxy layout: 0 fee payer, 1 static, 2 the source's first account, 3 static. The source + /// declares three accounts, the last two dropped (an authority the payer stands in for and + /// a trailing optional), like a Stake withdraw through GLAM. + private static IxProxy proxy() { + final var config = IxMapConfig.parseConfig(new HashMap<>(), new HashMap<>(), JsonIterator.parse(""" + { + "src_ix_name": "withdraw", + "src_discriminator": [4, 0, 0, 0], + "dst_ix_name": "stake_withdraw", + "dst_discriminator": [1, 2, 3, 4, 5, 6, 7, 8], + "dynamic_accounts": [ { "name": "glam_signer", "index": 0, "writable": true, "signer": true } ], + "static_accounts": [ + { "account": "%s", "index": 1, "writable": false, "signer": false }, + { "account": "%s", "index": 3, "writable": false, "signer": false } + ], + "index_map": [2, -1, -1] + } + """.formatted(STATIC_BEFORE.toBase58(), STATIC_AFTER.toBase58()))); + return config.createProxy(INVOKED_PROXY, FACTORY); + } + + private static Instruction source(final int numAccounts) { + final var accounts = new AccountMeta[numAccounts]; + for (int i = 0; i < numAccounts; ++i) { + accounts[i] = AccountMeta.createWrite(key(40 + i)); + } + return Instruction.createInstruction(CPI_PROGRAM, List.of(accounts), new byte[]{4, 0, 0, 0, 9}); + } + + private static List keys(final Instruction mapped) { + return mapped.accounts().stream().map(AccountMeta::publicKey).toList(); + } + + @Test + void aSourceWithEveryDeclaredAccountMapsAsBefore() { + final var mapped = proxy().mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(3)); + assertEquals(List.of(FEE_PAYER.publicKey(), STATIC_BEFORE, key(40), STATIC_AFTER), keys(mapped)); + } + + @Test + void aSourceThatLeavesTrailingDroppedAccountsOutMapsTheSame() { + for (final int supplied : new int[]{2, 1}) { + final var mapped = proxy().mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(supplied)); + assertEquals(List.of(FEE_PAYER.publicKey(), STATIC_BEFORE, key(40), STATIC_AFTER), keys(mapped), supplied + " accounts"); + assertEquals(4, mapped.accounts().size(), supplied + " accounts"); + } + } + + @Test + void aSourceWithAccountsBeyondTheMapPassesThemThroughAsRemaining() { + final var mapped = proxy().mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(4)); + assertEquals(List.of(FEE_PAYER.publicKey(), STATIC_BEFORE, key(40), STATIC_AFTER, key(43)), keys(mapped)); + } + + @Test + void aSourceMissingAnAccountTheProxySeatsIsRefusedByMessage() { + final var refused = assertThrows(IllegalStateException.class, + () -> proxy().mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(0))); + assertEquals("Instruction supplies 0 accounts, but the proxy seats account 0 at index 2.", refused.getMessage()); + } +} From 312c08b038236f89d03a8e4ae92471a22a066f8b Mon Sep 17 00:00:00 2001 From: jpe7s Date: Tue, 22 Sep 2026 14:11:24 -0500 Subject: [PATCH 2/4] test(ix-proxy): a required account seated at index zero is not omittable Index zero is a seat like any other; the review of this fix asked for the boundary to be pinned: a source that leaves out an account the proxy maps there is refused by message. --- .../proxy/OmittedTrailingAccountsTests.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java b/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java index 12ac0d2..362c6c8 100644 --- a/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java +++ b/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java @@ -94,4 +94,26 @@ void aSourceMissingAnAccountTheProxySeatsIsRefusedByMessage() { () -> proxy().mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(0))); assertEquals("Instruction supplies 0 accounts, but the proxy seats account 0 at index 2.", refused.getMessage()); } + /// Index zero is a seat like any other: a source that leaves out an account the proxy maps + /// there is refused, not treated as having nothing to seat. + @Test + void aRequiredAccountSeatedAtIndexZeroIsNotOmittable() { + final var config = IxMapConfig.parseConfig(new HashMap<>(), new HashMap<>(), JsonIterator.parse(""" + { + "src_ix_name": "pass", + "src_discriminator": [4, 0, 0, 0], + "dst_ix_name": "proxy_pass", + "dst_discriminator": [8, 7, 6, 5, 4, 3, 2, 1], + "dynamic_accounts": [ { "name": "glam_signer", "index": 1, "writable": true, "signer": true } ], + "static_accounts": [], + "index_map": [0] + } + """)); + final var proxy = config.createProxy(INVOKED_PROXY, FACTORY); + final var mapped = proxy.mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(1)); + assertEquals(List.of(key(40), FEE_PAYER.publicKey()), keys(mapped)); + final var refused = assertThrows(IllegalStateException.class, + () -> proxy.mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(0))); + assertEquals("Instruction supplies 0 accounts, but the proxy seats account 0 at index 0.", refused.getMessage()); + } } From c6cb8b0ac4c85647bbe9e8723033e156c6553636 Mon Sep 17 00:00:00 2001 From: jpe7s Date: Tue, 22 Sep 2026 15:22:43 -0500 Subject: [PATCH 3/4] test(ix-proxy): a dropped missing account ahead of a seated one; the divergence recorded Review of the short-source fix. The check loop already refuses by position, so the Math.min bound and the reset of the extras loop were redundant and are gone; the earlier message said the old code read past the accounts, when it wrote past an undersized mapped array, or failed to size it. A new test pins that which positions are missing decides, not how many: index_map [-1, -1, 2, -1] with one account is refused by message, where a check by counts would return a null account. The fixture is named for the shape it models, a Stake authorize whose map is [4, -1, -1]. This mapper maps any short source whose missing positions the map drops, required or optional, since the map carries no such distinction and a missing dropped account maps exactly as a supplied one; the TypeScript mapper refuses every short source. The README's index_map section and the ported TS test record the difference. Fuzzing: a seed reaches the short-source success path; the harness asserts that a mapped instruction carries no null account; and its catch around the mapping is IllegalStateException, the refusal in contract, so an index or array error can no longer hide behind it. --- README.md | 7 ++++ .../systems/glam/ix/proxy/IxProxyRecord.java | 12 +++--- .../systems/glam/ix/proxy/IxMapperFuzz.java | 12 ++++-- .../systems/glam/ix/proxy/IxMapperTest.java | 5 +++ .../proxy/OmittedTrailingAccountsTests.java | 38 +++++++++++++++--- ix-proxy/src/test/resources/fuzz/README.md | 3 ++ .../fuzz/ixMapper/short-source-dropped | Bin 0 -> 5 bytes 7 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 ix-proxy/src/test/resources/fuzz/ixMapper/short-source-dropped diff --git a/README.md b/README.md index 263cd8f..b179087 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,13 @@ Account Meta information for accounts which are always the same given a Solana c Defines the parameter index for the destination instruction. If the account has been removed or replaced use a negative number. +A source instruction may arrive with fewer accounts than the index map covers: a client that follows a codama IDL's +omitted optional-account strategy leaves an absent trailing optional account out entirely (the Stake program's lockup +authority). This mapper maps such a source when every missing position is one the map drops, and refuses it, naming the +position and slot, when it would have to seat an account it was not given. The map does not say which dropped positions +are optional, so any dropped account may be missing; a missing one maps exactly as a supplied one would. The TypeScript +mapper (`ix-mapper-ts`) refuses every source shorter than its index map instead; the two agree on everything else. + ## Build & Tests ```shell diff --git a/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java b/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java index 982da00..e2ea7e4 100644 --- a/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java +++ b/ix-proxy/src/main/java/systems/glam/ix/proxy/IxProxyRecord.java @@ -46,7 +46,10 @@ public Instruction mapInstructionUnchecked(final AccountMeta readCpiProgram, final int numAccounts = accounts.size(); // A source may arrive shorter than the index map: a client leaves an absent trailing // optional account out under the omitted strategy. Each missing position must be one the - // map drops; one the proxy seats has no account to seat. + // map drops; one the proxy seats has no account to seat. The map does not say which + // dropped positions are optional, so any dropped account may be missing: a missing one + // maps exactly as a supplied one would, dropped. (The TypeScript mapper refuses every + // short source instead; README, index_map.) for (int s = numAccounts; s < indexes.length; ++s) { if (indexes[s] >= 0) { throw new IllegalStateException(String.format( @@ -75,8 +78,7 @@ public Instruction mapInstructionUnchecked(final AccountMeta readCpiProgram, // the proxy program, flags preserved. A real account in the slot passes through. final var srcProgramId = instruction.programId().publicKey(); int s = 0, m; - final int mapped = Math.min(indexes.length, numAccounts); - for (; s < mapped; ++s) { + for (; s < indexes.length; ++s) { m = indexes[s]; if (m >= 0) { final var account = accounts.get(s); @@ -86,9 +88,9 @@ public Instruction mapInstructionUnchecked(final AccountMeta readCpiProgram, } } - // Copy extra accounts. + // Copy extra accounts; a missing position above was dropped, so none was read. m = this.numAccounts; - for (s = indexes.length; s < numAccounts; ++s, ++m) { + for (; s < numAccounts; ++s, ++m) { mappedAccounts[m] = accounts.get(s); } diff --git a/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperFuzz.java b/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperFuzz.java index e8faebd..f61c11d 100644 --- a/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperFuzz.java +++ b/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperFuzz.java @@ -144,14 +144,20 @@ public static void fuzzerTestOneInput(final byte[] data) { final Instruction mapped; try { mapped = programProxy.mapInstruction(FEE_PAYER, null, instruction); - } catch (final RuntimeException tolerated) { - // rejection is in contract; the unchecked path must also fail closed + } catch (final IllegalStateException tolerated) { + // rejection is in contract, by message; the unchecked path must fail closed the same way, + // never with an index or array error, which a catch-all once hid try { programProxy.mapInstructionUnchecked(FEE_PAYER, null, instruction); - } catch (final RuntimeException alsoTolerated) { + } catch (final IllegalStateException alsoTolerated) { } return; } + for (final var account : mapped.accounts()) { + if (account == null) { + throw new AssertionError("A mapped instruction carries a null account."); + } + } final int cpiLength = ixProxy.cpiDiscriminator().length(); final int proxyLength = ixProxy.proxyDiscriminator().length(); diff --git a/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperTest.java b/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperTest.java index 39b72dc..1a08052 100644 --- a/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperTest.java +++ b/ix-proxy/src/test/java/systems/glam/ix/proxy/IxMapperTest.java @@ -316,6 +316,11 @@ void shouldReturnNullForUnsupportedDiscriminator() { assertNull(mapToGlamIx(source, glamState, glamSigner)); } + /// The TypeScript mapper refuses any source shorter than its index_map; this port refuses + /// only a short source that leaves out an account the proxy seats (the System transfer's + /// missing account is one), and maps one whose missing positions the map drops, because a + /// client following a codama IDL's omitted strategy leaves absent trailing optionals out. + /// See README, index_map. @Test void shouldRejectMalformedInstructionWithTooFewKeys() { final var source = Instruction.createInstruction( diff --git a/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java b/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java index 362c6c8..61e886b 100644 --- a/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java +++ b/ix-proxy/src/test/java/systems/glam/ix/proxy/OmittedTrailingAccountsTests.java @@ -36,13 +36,13 @@ private static PublicKey key(final int marker) { /// Proxy layout: 0 fee payer, 1 static, 2 the source's first account, 3 static. The source /// declares three accounts, the last two dropped (an authority the payer stands in for and - /// a trailing optional), like a Stake withdraw through GLAM. + /// a trailing optional), the shape of a Stake authorize through GLAM, whose map is [4, -1, -1]. private static IxProxy proxy() { final var config = IxMapConfig.parseConfig(new HashMap<>(), new HashMap<>(), JsonIterator.parse(""" { - "src_ix_name": "withdraw", - "src_discriminator": [4, 0, 0, 0], - "dst_ix_name": "stake_withdraw", + "src_ix_name": "authorize", + "src_discriminator": [1, 0, 0, 0], + "dst_ix_name": "stake_authorize", "dst_discriminator": [1, 2, 3, 4, 5, 6, 7, 8], "dynamic_accounts": [ { "name": "glam_signer", "index": 0, "writable": true, "signer": true } ], "static_accounts": [ @@ -60,7 +60,7 @@ private static Instruction source(final int numAccounts) { for (int i = 0; i < numAccounts; ++i) { accounts[i] = AccountMeta.createWrite(key(40 + i)); } - return Instruction.createInstruction(CPI_PROGRAM, List.of(accounts), new byte[]{4, 0, 0, 0, 9}); + return Instruction.createInstruction(CPI_PROGRAM, List.of(accounts), new byte[]{1, 0, 0, 0, 9}); } private static List keys(final Instruction mapped) { @@ -101,7 +101,7 @@ void aRequiredAccountSeatedAtIndexZeroIsNotOmittable() { final var config = IxMapConfig.parseConfig(new HashMap<>(), new HashMap<>(), JsonIterator.parse(""" { "src_ix_name": "pass", - "src_discriminator": [4, 0, 0, 0], + "src_discriminator": [1, 0, 0, 0], "dst_ix_name": "proxy_pass", "dst_discriminator": [8, 7, 6, 5, 4, 3, 2, 1], "dynamic_accounts": [ { "name": "glam_signer", "index": 1, "writable": true, "signer": true } ], @@ -116,4 +116,30 @@ void aRequiredAccountSeatedAtIndexZeroIsNotOmittable() { () -> proxy.mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(0))); assertEquals("Instruction supplies 0 accounts, but the proxy seats account 0 at index 0.", refused.getMessage()); } + /// A dropped position ahead of a seated one does not hide it: what decides is which + /// positions are missing, not how many. A check by counts ("missing no more than dropped") + /// would return an instruction with a null account here. + @Test + void aDroppedMissingAccountAheadOfASeatedOneDoesNotHideIt() { + final var config = IxMapConfig.parseConfig(new HashMap<>(), new HashMap<>(), JsonIterator.parse(""" + { + "src_ix_name": "authorize", + "src_discriminator": [1, 0, 0, 0], + "dst_ix_name": "stake_authorize", + "dst_discriminator": [1, 2, 3, 4, 5, 6, 7, 8], + "dynamic_accounts": [ { "name": "glam_signer", "index": 0, "writable": true, "signer": true } ], + "static_accounts": [ + { "account": "%s", "index": 1, "writable": false, "signer": false }, + { "account": "%s", "index": 3, "writable": false, "signer": false } + ], + "index_map": [-1, -1, 2, -1] + } + """.formatted(STATIC_BEFORE.toBase58(), STATIC_AFTER.toBase58()))); + final var proxy = config.createProxy(INVOKED_PROXY, FACTORY); + final var mapped = proxy.mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(3)); + assertEquals(List.of(FEE_PAYER.publicKey(), STATIC_BEFORE, key(42), STATIC_AFTER), keys(mapped)); + final var refused = assertThrows(IllegalStateException.class, + () -> proxy.mapInstruction(READ_CPI_PROGRAM, FEE_PAYER, null, source(1))); + assertEquals("Instruction supplies 1 accounts, but the proxy seats account 2 at index 2.", refused.getMessage()); + } } diff --git a/ix-proxy/src/test/resources/fuzz/README.md b/ix-proxy/src/test/resources/fuzz/README.md index 443c40a..e493e1b 100644 --- a/ix-proxy/src/test/resources/fuzz/README.md +++ b/ix-proxy/src/test/resources/fuzz/README.md @@ -30,6 +30,9 @@ path they pin: index). - `identity-fixed` / `identity-variable` — pass-through on each lookup shape. - `rewrite-variable` — a discriminator-and-data rewrite. +- `short-source-dropped` — program A with one account against a map whose + missing positions are dropped: the success path of a source shorter than + its index map. - `unknown-program` / `payer-no-accounts` / `short-discriminator` — the pass-through and rejection edges. diff --git a/ix-proxy/src/test/resources/fuzz/ixMapper/short-source-dropped b/ix-proxy/src/test/resources/fuzz/ixMapper/short-source-dropped new file mode 100644 index 0000000000000000000000000000000000000000..0997a06a6081044976d218a64b1877a1853838d1 GIT binary patch literal 5 McmZQzWMt9;0024wF8}}l literal 0 HcmV?d00001 From 5fb7a6301bf08a69aef66ce576625fe00147959e Mon Sep 17 00:00:00 2001 From: jpe7s Date: Tue, 22 Sep 2026 15:22:43 -0500 Subject: [PATCH 4/4] chore(ix-proxy): retag the accepted baseline's line hints and the README's prose pitestIxProxyBaselineRetag moves the two empty-copy-equivalent rows to the line the guard now sits on; the README's prose named lines the rows had left behind before this branch. --- ix-proxy/config/pitest/README.md | 4 ++-- ix-proxy/config/pitest/ixProxy-accepted.csv | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ix-proxy/config/pitest/README.md b/ix-proxy/config/pitest/README.md index ab07545..92a060a 100644 --- a/ix-proxy/config/pitest/README.md +++ b/ix-proxy/config/pitest/README.md @@ -98,7 +98,7 @@ in HARDENING.md); the baseline CSVs carry the exact keys. normalizes a single-entry meta array back to the single-table form — the resulting transaction is identical; only the internal meta wrapper's identity differs, which no property-level assertion should pin. -- `# single-variant-guard` (2 rows, `IxMapConfig.createProxy` line 58): the +- `# single-variant-guard` (2 rows, `IxMapConfig.createProxy` line 67): the false direction of both operands of `proxyType != null && proxyType != ProxyType.PAYER`. `ProxyType` has a single constant, so "declared type is not PAYER" is unsatisfiable and the @@ -118,7 +118,7 @@ in HARDENING.md); the baseline CSVs carry the exact keys. diagnostics with no functional effect, and pinning it would mean asserting on a logging backend, a test that restates the implementation. - `# empty-copy-equivalent` (2 rows, `IxProxyRecord.mapInstructionUnchecked` - line 80): `len > 0` guards a payload `System.arraycopy`; at `len == 0` + line 103): `len > 0` guards a payload `System.arraycopy`; at `len == 0` (instruction data is exactly the discriminator) the copy is a zero-length no-op, so both the boundary flip and the forced-true direction are behaviourally identical. `len < 0` is unreachable — the proxy diff --git a/ix-proxy/config/pitest/ixProxy-accepted.csv b/ix-proxy/config/pitest/ixProxy-accepted.csv index 6d1c410..cb47915 100644 --- a/ix-proxy/config/pitest/ixProxy-accepted.csv +++ b/ix-proxy/config/pitest/ixProxy-accepted.csv @@ -3,8 +3,8 @@ systems.glam.ix.proxy.BaseIxProxy,validateMapping,RemoveConditionalMutator_EQUAL systems.glam.ix.proxy.ConfigLoader$Worker,get,VoidMethodCallMutator,SURVIVED # log-only # line 142 systems.glam.ix.proxy.IxMapConfig,createProxy,RemoveConditionalMutator_EQUAL_ELSE,SURVIVED # single-variant-guard # line 67 systems.glam.ix.proxy.IxMapConfig,createProxy,RemoveConditionalMutator_EQUAL_ELSE,SURVIVED # single-variant-guard # line 67 -systems.glam.ix.proxy.IxProxyRecord,mapInstructionUnchecked,ConditionalsBoundaryMutator,SURVIVED # empty-copy-equivalent # line 90 -systems.glam.ix.proxy.IxProxyRecord,mapInstructionUnchecked,RemoveConditionalMutator_ORDER_IF,SURVIVED # empty-copy-equivalent # line 90 +systems.glam.ix.proxy.IxProxyRecord,mapInstructionUnchecked,ConditionalsBoundaryMutator,SURVIVED # empty-copy-equivalent # line 103 +systems.glam.ix.proxy.IxProxyRecord,mapInstructionUnchecked,RemoveConditionalMutator_ORDER_IF,SURVIVED # empty-copy-equivalent # line 103 systems.glam.ix.proxy.ProgramProxyMap,mapTransaction,RemoveConditionalMutator_EQUAL_ELSE,SURVIVED # defensive-null-tables # line 60 systems.glam.ix.proxy.ProgramProxyMap,mapTransaction,RemoveConditionalMutator_EQUAL_IF,SURVIVED # defensive-null-tables # line 60 systems.glam.ix.proxy.ProgramProxyMap,mapTransactionWithTable,RemoveConditionalMutator_EQUAL_ELSE,SURVIVED # defensive-null-tables # line 89