Skip to content

Configure Copilot instructions for CRIU#2884

Open
YATIN072007 wants to merge 2 commits intocheckpoint-restore:criu-devfrom
YATIN072007:feature/copilot-instructions
Open

Configure Copilot instructions for CRIU#2884
YATIN072007 wants to merge 2 commits intocheckpoint-restore:criu-devfrom
YATIN072007:feature/copilot-instructions

Conversation

@YATIN072007
Copy link
Copy Markdown

Updated

.github/copilot-instructions.md**: Added explicit Build & Verification steps. This ensures that Copilot knows how to validate its changes by using the standard project tools.

Added

.github/instructions/pie.instructions.md**: Created path-specific instructions targeting Position Independent Executable (PIE) code in compel/ and pie/ directories. This clearly instructs Copilot to avoid external libraries like libc and global state, and to use raw system calls, enforcing critical constraints for parasite code.

Fixes: #2730

Follow the 'Best practices for Copilot coding agent in your repository' document:
1. Updated .github/copilot-instructions.md with build and verification steps (make build, make lint, make indent).
2. Added .github/instructions/pie.instructions.md for path-specific instructions targeting PIE code (Compel/PIE) to enforce strict constraints (no external libs, system calls only).

Fixes: checkpoint-restore#2730
Signed-off-by: YATIN JAMWAL <yatinjamwal07@gmail.com>
@@ -0,0 +1,30 @@
---
applyTo: "**/{pie,compel}/**/*.{c,h}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compel/ contains non-pie code. you need to specify exact paths in compel/.

* The code must be completely self-contained.

2. **No Global State**:
* Avoid global variables that require relocation or initialization by the dynamic linker.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about that. If you look at criu/pie/restorer.c, you will find some global variables...

4. **System Calls**:
* Use raw system calls for all OS interactions.
* Do not rely on glibc wrappers.
* Use the provided syscall wrappers (e.g., `sys_write`, `sys_mmap`) if available in the headers.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to describe where to find all available wrappers and how to add new ones when they are required.

Narrow applyTo patterns to strictly target PIE/parasite code.

Clarify global state rules to allow simple POD globals.

Add concrete guidance for using and adding system calls.

Update cross-references in copilot-instructions.md.

Signed-off-by: YATIN JAMWAL <yatinjamwal07@gmail.com>
@YATIN072007
Copy link
Copy Markdown
Author

@avagin
Please have a look ....
Let me know if any updates are to be made...

@avagin
Copy link
Copy Markdown
Member

avagin commented Feb 17, 2026

@avagin Please have a look .... Let me know if any updates are to be made...

I can see that you ignored some of my comments. Overall, it seems to me that the entire PR was generated by an AI agent, and you has not verified the output. I am skeptical that one can contribute meaningful documentation for this code without hands-on experience with it. Please correct me if I am wrong.

If this is for your GSoC application, please find a task that requires working directly with the code. You need to demonstrate a clear understanding of your changes.

@YATIN072007
Copy link
Copy Markdown
Author

YATIN072007 commented Feb 18, 2026

@avagin Please have a look .... Let me know if any updates are to be made...

I can see that you ignored some of my comments. Overall, it seems to me that the entire PR was generated by an AI agent, and you has not verified the output. I am skeptical that one can contribute meaningful documentation for this code without hands-on experience with it. Please correct me if I am wrong.

If this is for your GSoC application, please find a task that requires working directly with the code. You need to demonstrate a clear understanding of your changes.

Yes ... , actually it was getting quite complicated for me to completely understand and resolve the issue that's why I had to drop off with some of you suggestions and contribute with what I coud ...

I also took help of AI to an extent of understanding and some of the issue solving part...

I apricate your suggestion for me working on some other issue within my reach ; Thanks for your guidance...

Any other issues which you recommend and I can work upon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants