feat: prove receiver-held weights for source-visible PS6141 methods - #1017
Merged
Merged
Conversation
Extend sourceSummary with an explicit receiver-held weight role and bind the actual typed receiver through source helper methods. Require fresh producer origin, one effective consumption, a bounded receiver layout, and closed receiver/argument effects. Preserve existing tests and add parallel positive and adversarial method controls. Native/cache/error consumers and receiver-held packed-byte protocol geometry remain unsupported; this does not complete issue 835.
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.
PS6141 currently proves source-visible function consumers but rejects methods holding packed weights in their receiver. Extend
sourceSummarywithweightArgument: -1,packedArgument: 0, androwsArgument: -1for one explicit packed argument and receiver-held weights.Require a typed struct or pointer receiver with exactly one packed slice field and numeric shape fields. Bind the actual receiver through source helper methods, retain independent indexed weight origin, and preserve fresh producer origin, one effective consumer, normal source completion, and closed argument/receiver effects. Receiver metadata cannot supply weight-origin evidence. Aliases, mutation, retention, foreign receiver calls, repeated consumption, opaque bodies, method values/expressions, promotion, implicit addressing, and extra memory/cache fields remain unsupported.
Existing tests are preserved. Add 25 parallel source method cases, config role boundaries, and advisory delivery assertions. Pointer/value positives use a readable weight-bearing source method scaffold modeled on GoAI QuantLinear's layout; they are synthetic activation-owner evidence, not a historical activation-positive workload or numerical/performance proof. Authentic GoAI Forward's cache/native/error behavior and receiver-held packed-byte protocol geometry remain outside this bounded extension toward issue 835.
Validation: scoped Go 1.26 ordinary/race PS6141, config, and runner tests passed; independent review found no blockers. Unchanged pre-commit and pre-push hooks passed, including all 2050 ordinary and race names under the default toolchain, vet/build/staticcheck, generated documentation, plugin build, benchmark smoke execution, and self-scan. No automatic fix, numerical-equivalence claim, or measured speedup is introduced.