docs(rules): QML int-width, binding-freshness, boundary-value gotchas#85
Merged
jakewan merged 1 commit intoJun 23, 2026
Merged
Conversation
…dary-value testing The transaction-recording-form work surfaced three durable lessons worth encoding so the next agent does not re-discover them: - A QML int is 32-bit, so a cents value (carried as int64 end to end) silently truncates past ~$214k. Document typing cents-bearing properties as var, not int. - A derived property read inside its dependency's onXChanged handler can return a stale pre-change value; read the changed source property directly. - The overflow slipped every reading pass because example-based specs only probe representative magnitudes. Add a boundary-value testing convention as the orthogonal modality that catches that class. The two qt-app.md sections are path-conditioned to app/**; the testing.md section is cross-cutting (core/daemon/app seams) and always-loaded.
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.
Overview
The transaction-recording-form work surfaced three durable lessons worth encoding in the repo's own rule set so the next agent doesn't re-discover them rather than relying on one session's memory:
intis 32-bit, so a cents value — carried asint64end to end through the daemon and proto — silently truncates above ~$214k.qt-app.mdnow documents typing any cents-bearing orint64-crossing property asvar, notint.onXChangedhandler of the property it depends on can return a stale, pre-change value.qt-app.mdnow records reading the changed source property directly in the handler.testing.mdgains a boundary-value convention — the orthogonal modality that catches that class — framed around type/representation/seam crossings so it complements the existing input-validation guidance rather than duplicating it.The two
qt-app.mdsections are path-conditioned toapp/**, so they cost nothing off-app; thetesting.mdsection is cross-cutting (core/daemon/app seams) and always-loaded.Issue references
Related to #38.