Deploy to the handset from the cluster
CI builds an arm64 image (compositor, host, chandra-remote, modules) and deploys the updater pod that installs it on the phone. chandra-remote updates go in live (SIGUSR2 restarts it in place); the compositor waits for an idle, locked phone or an approval, and a locked session restarts locked. Host tests: the launcher no longer draws its label in a narrow panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d2e00b4658
commit
2aa3de5741
14 files changed
+675
-2
No files matched your search
@@ -13,6 +13,17 @@
|
||||
/// │ success: "unlocked" ───┘──► unlocked
|
||||
/// └── power off / chandra-ctl lock cancel: "unlock-failed" ──► stay locked
|
||||
|
||||
///| While this file exists a login session starts locked. Whoever restarts a locked session (the
|
||||
/// handset updater, handset/handset.sh) puts it there as root, so the restart doesn't unlock it.
|
||||
pub let lock_marker : String = "/run/chandra-start-locked"
|
||||
|
||||
///| Lock the session if the file `path` is there (and not empty).
|
||||
pub fn ChandraCompositor::lock_if_marked(self : ChandraCompositor, path : String) -> Unit {
|
||||
if @sys.read_file_bytes(path).length() > 0 {
|
||||
self.lock_now()
|
||||
}
|
||||
}
|
||||
|
||||
///| Whether the session is locked right now.
|
||||
pub fn ChandraCompositor::is_locked(self : ChandraCompositor) -> Bool {
|
||||
self.locked
|
||||
|
||||
@@ -325,3 +325,16 @@ test "lock: agent drop clears unlock_pending and restarted agent resumes unlock
|
||||
@sys.unlink(hpath)
|
||||
r.comp.close()
|
||||
}
|
||||
|
||||
///|
|
||||
test "lock: a marked session starts locked" {
|
||||
let comp = new_comp("lock-marker")
|
||||
let path = "/tmp/chandra-lock-marker-" + @sys.getpid().to_string()
|
||||
comp.lock_if_marked(path)
|
||||
assert_false(comp.is_locked())
|
||||
ignore(@sys.write_file_bytes(path, b"1\n"))
|
||||
comp.lock_if_marked(path)
|
||||
assert_true(comp.is_locked())
|
||||
@sys.unlink(path)
|
||||
comp.close()
|
||||
}
|
||||
Reference in new issue
Block a user