autodream-web: two concurrent open calls share one login handoff file

Open Beginner friendly
#199 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, shell
Domain
cli

Research direction

Start at the open subcommand in the autodream-web script and trace every place it writes or reads $AUTODREAM_DIR/web-login.html, including the login handler that deletes the handoff. Give each call its own filename with a random suffix and 0600 permissions, delete only that call's file on successful login, and sweep stale handoffs at the start of open. Done when two concurrent open calls both log in without clobbering each other and leftover files older than a few minutes are removed on the next run.

Written by the indexing model from the issue text.

Description

From the gate on https://github.com/STRML/autodream/pull/198 (round 3, non-blocking). Both autodream-web open calls write $AUTODREAM_DIR/web-login.html; if the second replaces it before the first browser logs in, the first login deletes the second handoff and the second browser finds no file. Running open again recovers. Fix: a per-call handoff name (random suffix, 0600) that its own successful login deletes, with stale handoffs older than a few minutes swept on the next open.

Dominant language
Shell
Stars
0
Forks
2
Avg merge
11h 31m
Merged PRs (30d)
26

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from STRML/autodream

All issues in STRML/autodream

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.