ObliviOS Developer portal Project site

Home / Decisions / ADR-054

Adopt a new hard rule in AGENTS.md ("Build & upstream discipline").

Accepted, recorded 26 August 2026.

Decision
ADR-054
Date
2026-08-26
Status
AcceptedAccepted
Mentions
ADR-053
Mentioned by
ADR-055

1Decision

Adopt a new hard rule in AGENTS.md ("Build & upstream discipline"): every future AOSP-side source change must be authored locally in a disposable git-tracked worktree and landed on the build server with git am, never by editing files directly on the build server's live tree — and land Task 2 of 9 of the Duress decoy user switch plan (the dialog-free ActivityManagerInternal/UserController.switchToUserSilently path) as the first change made this way. This is a deliberate exception to ADR-053's own review-trigger note that Task 2 landing alone would not need a new ADR — the exception is the authoring-methodology change, not the code.

2Why and evidence

Every prior AOSP-side task in this project, including Task 1 of this same plan, was authored by editing files directly on the build server's live tree (a python/sed script scp'd over and run there, per Task 1's own methodology note in docs/superpowers/plans/2026-08-21-duress-decoy-user-switch.md).

The owner identified this as a standing mistake: a change that only ever exists as a live mutation on one personal server cannot be reviewed as a diff before landing, cannot be reproduced by anyone else, and defeats the actual purpose of the aegisos-platform/aegisos-services patch packages, which exist precisely so another contributor can git am the same patches against the pinned manifest tag without ever touching this project's own build server.

Task 2 was authored under the new discipline instead: the three touched files (core/java/android/app/ActivityManagerInternal.java, services/core/java/com/android/server/am/ActivityManagerService.java, services/core/java/com/android/server/am/UserController.java) were fetched read-only from the real branch HEAD (bc0f20e0166a8c75334dbf0e32e03d46b1a1ed71, confirmed clean working tree), staged in a disposable local git repo (aegisos-platform/.worktrees/duress-decoy-task2/, already gitignored for exactly this purpose), edited there as normal reviewable commits after independently confirming every one of the plan's three insertion points against the real fetched source (all matched exactly), then turned into a patch via git format-patch and landed on the real aegisos-duress-decoy-switch branch with git am --3way, owner-executed — applied cleanly, no conflicts.

3Consequences

AGENTS.md's new rule governs every future AOSP-side patch project-wide, not just this one. This change is exported as aegisos-platform/credential/duress-unlock-decoy/patches/frameworks-base/0003, appended to the existing Task 1 package per ADR-053's own instruction. Task 2 of 9 is not yet fully complete: Step 4 of the plan (a real m systemimage build proving this compiles) has not run — this ADR records the patch landing on the branch and the methodology adoption, not the whole task.

4Review when

Revisit if a future patch genuinely cannot be authored this way (e.g. something only discoverable by interactively exploring live build output) — that needs its own explicit, reasoned exception recorded at the time, not a silent reversion to live editing. Do not treat Task 2 as complete until its Step 4 build has actually run.

Read from docs/governance/decision-log.md, entry ADR-054.