Repository navigation
Patch Requests
ChatGPT does a poor job of keeping mental models when working on patches for errors. This is a process to improve its ability to provide error free patches.
From the project root:
cd /Users/rodrigosilveira/projects/EnterpriseRemoteSystems
git branch --show-current
git status --short
git rev-parse HEAD
git archive \
--format=zip \
--output=~/Downloads/ers-current-branch.zip \
HEADThen upload:
~/Downloads/ers-current-branch.zip
This avoids stale folder ZIPs and guarantees the archive matches the exact committed branch state.
For example:
Applied:
- bite-27d-authorization-e2e-coverage.patch
- bite-27d-enable-route-auth-in-deployed-test.patch
- bite-27d-public-healthz-smoke-fix.patch
Failed/not applied:
- bite-27d-healthz-public-fast-path-fix.patch
That prevents me from accidentally generating a patch against the wrong patch-stack state.
cd /Users/rodrigosilveira/projects/EnterpriseRemoteSystems
git branch --show-current
git status --short
git log --oneline -5If git status --short is not empty, I need to know that before preparing a patch.
This is especially useful:
grep -n "healthz\|RegisterHealth\|Use(" backend/internal/http/routes/*.goor for a specific failed file:
sed -n '1,120p' backend/internal/http/routes/authorization.go
sed -n '1,120p' backend/internal/http/routes/routes.go
sed -n '1,120p' backend/internal/http/routes/health.goFor any future ERS patch after a failed patch, I should not guess. I will use this stricter process:
Confirm the intended branch.
Confirm the exact patch stack already applied.
Generate the patch only from the current uploaded git archive.
Avoid overlapping previous failed patch areas unless necessary.
Validate with git apply --check against the exact archive.
Tell you clearly whether the patch is:
a fresh patch against the branch baseline, or
an incremental patch after already-applied patches.
A good future request format would be:
Branch: 632-bite-27d-authorization-e2e-coverage
HEAD: <sha>
Applied patches: <list>
Failed patches: <list>
Current repo archive: attached git archive from HEAD
Error: <paste log>
That will keep us out of the hole we just hit.