bcquality/microsoft/knowledge/performance
Wenjie Fan 1bf5a3b276
Add precision guards for systematic agent false-positive patterns (#112)
* Add precision guards for systematic agent false-positive patterns

Encodes reviewer-confirmed FP guards from the online eval: tooltip-inherited, page-trigger default return, drill-down filter not visible in diff, dual-trigger CalcFields (do.md); and a released-baseline precondition for breaking-change/upgrade findings on never-shipped symbols.

* Scope suggested-code and location to exactly the changed lines

Addresses reviewer-reported misplaced suggestions from the eval: insert-only-property emitting the whole field, single-statement rewrites anchored on the procedure name, and reductive multi-line collapses. The skill now emits a location range that matches precisely the rewritten lines.

* Correct suggested-code scoping guidance to match one-click anchor mechanics

A lone inserted line matches no existing file line and cannot be anchored; bracket the new line with one adjacent unchanged line instead. Reductive collapses omit suggested-code and fall back to a manual snippet.

* Move BC-specific FP guards out of do.md into leaf skills

do.md is the stable action-skill template and must stay domain-agnostic (JesperSchulz review). Relocate the four known false-positive patterns to their domain leaves: ToolTip-inheritance to al-ui-review; drill-down/lookup filtering and CalcFields lifecycle to al-performance-review; page-trigger exit(true) semantics to al-error-handling-review.

* Move suggested-code line-scoping guidance out of do.md into al-code-review

do.md must not carry instructions for how the review skill behaves (JesperSchulz review). Relocate the location/suggested-code precise-span rules to al-code-review's existing Suggested-code guidance section. do.md is now unchanged vs main.

* Move false-positive guards from skills into knowledge files

Keep review skills slim (finders/appliers). The FP guards and released-baseline preconditions previously embedded in leaf skills become negative-clarification knowledge articles in their domains, and the agent-findings policy edits to al-ui/al-privacy are reverted to main. Adds 6 knowledge files: error-handling (page-boolean-triggers-default-to-true), ui (bound-page-field-inherits-source-field-tooltip), performance (calcfields-in-both-getrecord-triggers-is-not-redundant, page-effective-filter-may-live-outside-the-diff), breaking-changes (unreleased-symbol-change-is-not-a-breaking-change), upgrade (unreleased-schema-change-needs-no-upgrade-path).

* Revert branch's suggested-code scoping addition in al-code-review

The three location-span shapes added to al-code-review are output-format mechanics, not domain knowledge: one-click span correctness is the engine's job (Resolve-SuggestionPlacement) and do.md already owns the suggested-code/location contract. The AL concerns the examples illustrate are already covered by existing knowledge (use-isempty-for-existence-check, data-classification-required-on-pii-fields, no-space-before-method-parenthesis). Restores al-code-review to main; the branch now adds only the 6 knowledge files.

* Restore al-ui/al-privacy review skills to base (zero diff in PR)

These two leaf skills carried an accidental net change against the PR merge-base because an earlier revert used the current origin/main (post-#110) instead of the branch base (pre-#110). Restoring them to the merge-base version removes them from the PR diff entirely. Three-way merge still preserves main's #110 suppression.

---------

Co-authored-by: wenjiefan <wenjiefan@microsoft.com>
2026-07-17 14:17:04 +02:00
..
addloadfields-in-report-onpredataitem.bad.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
addloadfields-in-report-onpredataitem.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
addloadfields-in-report-onpredataitem.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
admin-and-migration-pages-tolerate-lower-perf.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
apply-filters-before-iterating.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
apply-filters-before-iterating.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
apply-filters-before-iterating.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
apply-guards-before-get.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
apply-guards-before-get.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
apply-guards-before-get.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-cloning-records-before-modify-delete-in-loops.bad.al Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
avoid-cloning-records-before-modify-delete-in-loops.good.al Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
avoid-cloning-records-before-modify-delete-in-loops.md Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
avoid-commit-inside-loops.bad.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
avoid-commit-inside-loops.good.al Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
avoid-commit-inside-loops.md Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
avoid-get-inside-loop-on-large-table.bad.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
avoid-get-inside-loop-on-large-table.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
avoid-get-inside-loop-on-large-table.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
avoid-growing-globals-in-singleinstance-subscribers.bad.al Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
avoid-growing-globals-in-singleinstance-subscribers.good.al Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
avoid-growing-globals-in-singleinstance-subscribers.md Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
avoid-recordref-in-hot-loop.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-recordref-in-hot-loop.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-recordref-in-hot-loop.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-redundant-get-when-record-already-loaded.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-redundant-get-when-record-already-loaded.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-redundant-get-when-record-already-loaded.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-user-prompts-inside-transactions.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-user-prompts-inside-transactions.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
avoid-user-prompts-inside-transactions.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
calcfields-in-both-getrecord-triggers-is-not-redundant.md Add precision guards for systematic agent false-positive patterns (#112) 2026-07-17 14:17:04 +02:00
calcsums-instead-of-calcfields-in-loop.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
calcsums-instead-of-calcfields-in-loop.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
calcsums-instead-of-calcfields-in-loop.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
choose-maintainsiftindex-by-read-write-ratio.good.al Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
choose-maintainsiftindex-by-read-write-ratio.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
codeunit-run-as-atomic-sub-operation.bad.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
codeunit-run-as-atomic-sub-operation.good.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
codeunit-run-as-atomic-sub-operation.md Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
codeunit-run-requires-prior-commit-inside-transaction.bad.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
codeunit-run-requires-prior-commit-inside-transaction.good.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
codeunit-run-requires-prior-commit-inside-transaction.md Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
do-not-locktable-in-read-only-procedure.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-locktable-in-read-only-procedure.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-locktable-in-read-only-procedure.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-modify-in-onaftergetrecord.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-modify-in-onaftergetrecord.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-modify-in-onaftergetrecord.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-remove-sourcetabletemporary-from-api-page.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-remove-sourcetabletemporary-from-api-page.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
do-not-remove-sourcetabletemporary-from-api-page.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
findset-true-applies-updlock-on-read.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
findset-true-applies-updlock-on-read.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
findset-true-applies-updlock-on-read.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
flowfield-source-key-needs-sumindexfields.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
flowfield-source-key-needs-sumindexfields.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
flowfield-source-key-needs-sumindexfields.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
guard-event-subscribers-before-db-call.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
guard-event-subscribers-before-db-call.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
guard-event-subscribers-before-db-call.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
hidden-flowfields-still-calculate-before-bc26-opt-in.bad.al Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
hidden-flowfields-still-calculate-before-bc26-opt-in.good.al Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
hidden-flowfields-still-calculate-before-bc26-opt-in.md Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
load-common-fields-before-branching-on-case.bad.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
load-common-fields-before-branching-on-case.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
load-common-fields-before-branching-on-case.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
load-only-primary-key-fields-for-reference-work.bad.al Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
load-only-primary-key-fields-for-reference-work.good.al Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
load-only-primary-key-fields-for-reference-work.md Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
maintainsqlindex-false-breaks-flowfield-sift.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
maintainsqlindex-false-breaks-flowfield-sift.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
order-case-branches-by-frequency.bad.al Promote performance knowledge from community to Microsoft layer (#50) 2026-07-01 10:41:01 +02:00
order-case-branches-by-frequency.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
order-case-branches-by-frequency.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
page-effective-filter-may-live-outside-the-diff.md Add precision guards for systematic agent false-positive patterns (#112) 2026-07-17 14:17:04 +02:00
pair-findset-with-next-loop.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
pair-findset-with-next-loop.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
pair-findset-with-next-loop.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
pass-false-to-insert-when-trigger-not-needed.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
pass-false-to-insert-when-trigger-not-needed.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
prefer-dictionary-over-temporary-table-for-lookups.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
prefer-modifyall-over-per-row-modify.bad.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
prefer-modifyall-over-per-row-modify.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
prefer-modifyall-over-per-row-modify.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
prefer-readisolation-over-locktable-for-reads.bad.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
prefer-readisolation-over-locktable-for-reads.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
prefer-readisolation-over-locktable-for-reads.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
setcurrentkey-aligns-key-with-filters.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
setcurrentkey-aligns-key-with-filters.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
singleton-setup-tables-need-no-access-optimization.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
temporary-tables-have-no-database-cost.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
triggers-and-media-field-regress-modifyall.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
understand-implicit-transaction-boundary.md Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
use-deleteall-for-filtered-bulk-deletion.bad.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
use-deleteall-for-filtered-bulk-deletion.good.al Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
use-deleteall-for-filtered-bulk-deletion.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
use-get-instead-of-findfirst-on-full-primary-key.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-get-instead-of-findfirst-on-full-primary-key.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-get-instead-of-findfirst-on-full-primary-key.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-isempty-for-existence-check.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-isempty-for-existence-check.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-isempty-for-existence-check.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-setautocalcfields-for-per-row-flowfields.bad.al Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
use-setautocalcfields-for-per-row-flowfields.good.al Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
use-setautocalcfields-for-per-row-flowfields.md Add per-row AL performance guidance (#97) 2026-07-14 12:51:39 +02:00
use-setloadfields-for-partial-records.bad.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-setloadfields-for-partial-records.good.al Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-setloadfields-for-partial-records.md Regenerate microsoft/knowledge from upstream BCApps instructions 2026-05-21 09:53:09 +02:00
use-textbuilder-for-string-concatenation-in-loops.md Correct performance knowledge guidance (#94) 2026-07-14 11:26:29 +02:00
use-tryfunction-for-error-catching-not-rollback.bad.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
use-tryfunction-for-error-catching-not-rollback.good.al Transaction and error handling in BC AL - new knowledge articles 2026-04-23 20:58:02 +03:00
use-tryfunction-for-error-catching-not-rollback.md Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00