mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-17 17:31:44 +08:00
Sync Copilot knowledge base and prompts
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Orders
|
||||
|
||||
- Process staged tasks one by one with verification [12]
|
||||
- Process staged tasks one by one with verification [13]
|
||||
- Crash early instead of adding error-tolerance fallbacks [6]
|
||||
- Use `WString::IndexOf` with `wchar_t` (not `const wchar_t*`) [4]
|
||||
- Use `collections::BinarySearchLambda` on contiguous buffers (guard empty) [4]
|
||||
@@ -12,10 +12,10 @@
|
||||
- Prefer simple calls before interface casts [2]
|
||||
- Validate expectations against implementation and existing tests [2]
|
||||
- Use `vl::Exception` for expected semantic failures and `CHECK_ERROR` for invariants [2]
|
||||
- Port fixes from imports to source repositories [2]
|
||||
- Do not assume async callback owners are heap allocated [1]
|
||||
- Extract abstractions only for real shared behavior [1]
|
||||
- Make `Stop()` drain asynchronous work before returning [1]
|
||||
- Port fixes from imports to source repositories [1]
|
||||
- Prefer well-defined tests over ambiguous edge cases [1]
|
||||
- Prefer `operator<=> = default` for lexicographic key structs [1]
|
||||
- Prefer two-pointer merge for sorted range maps [1]
|
||||
@@ -26,6 +26,7 @@
|
||||
- Prefer designated initializers for aggregate-like structs [1]
|
||||
- Construct `Nullable<WString>` explicitly in function calls [1]
|
||||
- Sort serialization metadata by deterministic keys, not pointer addresses [1]
|
||||
- Start async callbacks after most-derived construction [1]
|
||||
- `collections::Dictionary` copy assignment is deleted (use move/swap) [1]
|
||||
- Dereference `Ptr<T>` via `.Obj()` (not `*ptr`) [1]
|
||||
- `vl::regex` separator regex: `L"[\\/\\\\]+"` [1]
|
||||
@@ -82,6 +83,8 @@ If an API exposes `Stop()`, callers should be able to rely on it as the shutdown
|
||||
|
||||
Do not treat files copied into `Import` or generated release files as the source of truth. When a fix affects imported `Vlpp` files, make the upstream change in `Vlpp`, regenerate its release output, and then copy the generated files downstream. When a `.github` instruction or script fix is needed, port it through `Tools/Copilot`.
|
||||
|
||||
When a downstream repo such as `GacUI` exposes a bug in imported `VlppOS` inter-process code, fix and verify it in `VlppOS`, regenerate `VlppOS\Release`, and then import the generated release files downstream.
|
||||
|
||||
## Validate expectations against implementation and existing tests
|
||||
|
||||
Before encoding expectations (especially for return value conventions and error semantics), read the relevant implementation and check existing tests for established patterns. This reduces churn from mismatched assumptions (e.g. public API returning a normalized error value even if internals use different sentinel codes).
|
||||
@@ -134,6 +137,10 @@ When passing string literals to a function parameter typed as `Nullable<WString>
|
||||
|
||||
When serializing metadata into stable binary output, do not let pointer-address ordering decide indices or item order. Collect items for membership checks if needed, then sort the serialized lists by deterministic keys such as type names or owner-qualified member signatures before assigning indices and writing the stream. This applies to type descriptors, methods, properties, events, and generated custom-type lists whose order would otherwise depend on allocation order or ASLR.
|
||||
|
||||
## Start async callbacks after most-derived construction
|
||||
|
||||
Objects that dispatch asynchronous callbacks should not begin listening or queue callbacks from base constructors. Initialize state in constructors, then expose an explicit `Start()` boundary that callers invoke after the most-derived object is fully constructed, so callbacks can safely dispatch to final overrides.
|
||||
|
||||
## `collections::Dictionary` copy assignment is deleted (use move/swap)
|
||||
|
||||
`collections::Dictionary` does not support copy assignment. When you need to replace one dictionary with another, use move semantics (when appropriate), or rebuild/swap explicitly instead of `a = b`.
|
||||
|
||||
@@ -169,3 +169,14 @@ Propose any solution you can think of and write them down in the document, you m
|
||||
- Unit test is always required to ensure the proposal actually works.
|
||||
- Review all code you have changed, make sure they are clean and follow the coding convention in `REPO-ROOT/.github/Guidelines/Coding.md`.
|
||||
- If code review changes the code, you need to run the test cases again to confirm the changes.
|
||||
|
||||
## Additional Instructions
|
||||
|
||||
- `git commit` and `git push` all local changes to the current branch, unless there are explicit instructions to override this.
|
||||
- When the request is separated by multiple tasks like `## Task N`, it is important to do task one by one strictly, by me designing tasks in this way, we can achieve:
|
||||
- Easy-to-understand commits for file changing that is easy to review.
|
||||
- Limit side effects so that you don't have to deal with massive of issues at the same time.
|
||||
- `git commit` and `git push` should happen after every single task, unless there are explicit instructions to override this.
|
||||
- When different tasks happens in different repos, you are going to change the `Copilot_Investigate.md` in that repo.
|
||||
- If multiple repos are involved, for all involved repos that has the `Copilot_Investigate.md` file, decide which repo is the main repo for the task and update that file in the main repo.
|
||||
- If the repo does not have such document, you are allowed not to create one, skip writing such file.
|
||||
|
||||
Reference in New Issue
Block a user