Repository navigation
Description
Is there an existing issue for this?
- I searched all-state issues for TypedPolicy and for coverage / false-positive reports. Existing dependency/interop and reconciliation reports describe different findings; no matching generated-source line attribution report was found.
Which actions are affected?
Pull Request
Which platforms are affected?
Linux (review producer and passing complete backend CI); macOS (independent focused Gradle/Kotlin/JaCoCo reproduction). The finding concerns reasoning about generated fixture source, not an asserted platform-specific compiler defect.
Description
Bugbot reports a medium/99%-confidence finding that a real coverage fixture asserts an executed return is missed. It assigns the executed positive return to generated Kotlin source line 7, but the exact fixture writes that return on line 6. Line 7 is the unexecuted negative return. The unchanged test passes, and independently retained JaCoCo XML confirms its line/branch assertions.
Consumer: GeckoCV PR #42, exact analyzed source 2379ca938f8a93a8c8d2d767c38726b5d078fdec.
Finding: 4419172329, review 5706541373, fingerprint fp-55e41399, semantic sf-0fca1181.
Producer: 40977076354; smart effort, codex / gpt-6-luna. Telemetry reports complete context and all 21/21 analysis partitions completed.
Expected: distinguish Python host-file coordinates from line numbers in the Kotlin file generated by its literal string. Trace the actual written bytes and executed branch before asserting that the unchanged test fails. Actual: the finding recommends covering line 7, which would incorrectly treat the unexecuted negative-return statement as executed.
This is one observed review false positive, not proof of an internal parser/mapping root cause or a deterministic model regression. Other UI findings in the same review are valid and are being fixed independently.
Reproducing the issue
- Inspect the immutable fixture source. The fixture writer writes its string unchanged; there is no leading newline in the Kotlin literal.
- The relevant generated file is exactly:
package example
inline fun <reified T : Any> isKind(value: Any): Boolean = value is T
class TypedPolicy {
fun recognizes(value: Any): Boolean = isKind<String>(value)
fun decision(value: Int): Int {
if (value > 0) return 1
return -1
}
fun neverObserved(): Int = 99
}- Its real JUnit test calls
policy.decision(4)and expects 1. The positive return is on line 6, while line 7 is not executed. The fixture intentionally also leaves line 9 unexecuted. - With Java 17 and the repository's populated offline Gradle cache, execute the unchanged fixture from repository root:
python .github/scripts/tests/test_backend_coverage.py BackendCoverageTests.test_kotlin_inline_attribution_keeps_unexecuted_authored_code_visible- Observe success. Complete exact-source backend CI 40974861106 already passes the full coverage-policy suite. A fresh focused invocation after the finding also passes (one original test, 13.158 seconds). Its generated Kotlin file and XML were copied before temporary-directory cleanup without modifying the test, compiler, instrumentation or assertions.
copilot Version
vypdev/copilot@v3 explicitly resolves to f5e5a4cf9a80248994469cd88ad55eecab5b95ca / 3.10.6 in producer 40977076354. No claim is made about an unexecuted newer release or current upstream development changes.
Relevant Log Output
Ran 1 test in 13.158s
OK
Generated TypedPolicy.kt / actual JaCoCo source-line counters:
2: reified inline body mi=0 ci=1 mb=0 cb=0
6: if (value > 0) return 1 mi=0 ci=4 mb=1 cb=1
7: return -1 mi=2 ci=0 mb=0 cb=0
9: neverObserved return 99 mi=2 ci=0 mb=0 cb=0
Thus line 6 has executed instructions and both a covered and missed authored branch; lines 7 and 9 correctly remain missed.
Additional context and comments
Suggested regression: review a host-language fixture that writes an embedded Kotlin source without a leading newline, then uses numeric JaCoCo source-line assertions. Preserve the distinction between host and generated coordinates. Include a genuine counterexample that incorrectly asserts the executed positive return is missed, so improving this case does not suppress real coverage-test defects. Reconcile an asserted runtime test failure against exact-source execution/XML when available, or express uncertainty instead of presenting an unexecuted prediction as a proven failure.
No consumer assertions, floors, filters, protection, workflow version or scope are weakened. No Copilot core changes or new remote branch were made by the consumer. No credentials or candidate data are included.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Bugbot confuses generated Kotlin source lines and flags correct JaCoCo missed-line assertions[/-][+]π - Bugbot confuses generated Kotlin source lines and flags correct JaCoCo missed line assertions[/+]vypbot commentedon Oct 30, 2026
Hi! Iβm @vypbot, the Copilot assistant for this repository.
I can answer questions, explain the codebase, propose implementation and test plans, review issues and pull requests for potential bugs or security problems, and help authorized maintainers apply changes.
Try
/copilot helpto see the available commands, or mention @vypbot with your question.[-]π - Bugbot confuses generated Kotlin source lines and flags correct JaCoCo missed line assertions[/-][+]ππ§βπ» - Bugbot confuses generated Kotlin source lines and flags correct JaCoCo missed line assertions[/+]11 remaining items
Merge pull request #805 from vypdev/bugfix/796-bugbot-confuses-generaβ¦
vypbot commentedon Oct 30, 2026
Issue closed: synchronization recommendation retired
No branch synchronization is required for this closed issue.
The previous recommendation is historical. Issue closure does not certify that the branches are synchronized.