GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — t3code-seed-providers: the seed write does not preserve settings.json's file mode — a 0600 settings file becomes umask-default (0660/0644), and a symlinked settings.json is silently replaced by a regular file · Issue #3170 · developing-today/code

t3code-seed-providers: the seed write does not preserve settings.json's file mode — a 0600 settings file becomes umask-default (0660/0644), and a symlinked settings.json is silently replaced by a regular file #3170

New issue
Copy link
New issue
Copy link
Closed
#4313
Closed
t3code-seed-providers: the seed write does not preserve settings.json's file mode — a 0600 settings file becomes umask-default (0660/0644), and a symlinked settings.json is silently replaced by a regular file#3170
#4313
Copy link
Assignees
dezren39
Labels
app/t3code-seed-providersPackage/app: t3code-seed-providers (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/securitySecurity issue or security hardeningpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 31, 2026
Issue body actions

Problem

t3code-seed-providers' write path does not preserve the existing settings.json file mode — and silently destroys a symlink.

Evidence on main (47214f1c), pkgs/t3code-seed-providers/seed.sh (the embedded Python, final write block):

tmp = path.with_suffix(".seed-tmp")
tmp.write_text(json.dumps(doc, indent=2) + "\n")
tmp.replace(path)
  • tmp is a brand-new file, so it gets the process umask's default mode; replace() then swaps it in for the original. Nothing reads or reapplies the original file's mode (no stat / chmod anywhere in the script).
  • The same replace() replaces a symlink itself rather than writing through it: if settings.json is a symlink, the link is silently replaced by a regular file and the link target is never seeded.

This file is a credential-bearing one by the script's own header: it notes upstream settings hand-edited by users, mentioning "Bitbucket tokens hand-edited into settings.json". A user who keeps that file at 0600 loses that protection on the first seed run that changes anything, with no warning.

Verified this run

Probe (sandbox, actual seed.sh from main 47214f1c, temp T3CODE_HOME, settings.json = {"providerInstances": {}}, all *_BIN/GROK_* env empty; record in the fleet backlog probe dir probe-2026-10-31-laneA-seed-mode/probe.txt):

  • Mode case: settings.json chmod 0600 before the run. Run exits 0 ("added antigravity, claudeAgent, codex, grok") and afterwards the file's mode is 0660 — the sandbox umask (0002) default. Under the more common umask 022 the same path yields 0644, i.e. world-readable.
  • Symlink case: settings.json a symlink to a sibling file. Run exits 0; afterwards settings.json is no longer a symlink (a regular file holds the seeded content) and the link target's content is unchanged — the seeded settings silently went somewhere the user's setup does not read through the link.
  • Control nuance: on a run that changes nothing the script exits before the write block, so the mode/symlink survive — the damage happens exactly on the runs that write.

Why it matters

The seed runs automatically before t3 starts, so the first store-path refresh or 1.x safety-disable silently widens a token-bearing file from owner-only to group/world-readable on the user's own machine, and breaks a symlinked settings layout without any message. Both are properties of the one shared write path, so one fix covers both.

Acceptance criteria

  • When the seed writes, the resulting settings.json has the same permission mode the file had before the run (a newly created file keeps the current default). A test in test_seed.py sets 0600, runs a seed that changes something, and asserts the mode is still 0600.
  • If settings.json is a symlink, the write goes through to its target (the link survives and the target receives the seeded content), or the script refuses with a clear stderr message and changes nothing — it must not silently replace the link with a regular file. A test pins whichever behavior is chosen.
  • Existing behavior is unchanged otherwise: malformed settings still left untouched with a warning (t3code-seed-providers: seed script crashes on parseable-but-wrong-shaped settings.json — one bad shape disables all seeding and the OpenCode-1.x safety disable #2738), no-change runs still write nothing, and the current test_seed.py cases still pass.

Distinct from: #2738 (closed — malformed settings shapes crash/disable seeding; different failure in the read/validate path, not the write path).

Activity

Next
  1. dezren39
    added
    kind/securitySecurity issue or security hardening
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/lowNice to have; do when convenient
    app/t3code-seed-providersPackage/app: t3code-seed-providers (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run, 2026-10-31 12:35 CDT
    • Found via: filed this run
    • Task: Verify pkgs/t3code-seed-providers/seed.sh's write path against a token-bearing settings.json: ran the actual script in a temp T3CODE_HOME — a 0600 settings file came out 0660 (umask default) after a change-making run, and a symlinked settings.json was silently replaced by a regular file with its target never seeded. Evidence: issue body; probe record in the fleet backlog (probe-2026-10-31-laneA-seed-mode/probe.txt).
    • Expectation: the write preserves the existing file's mode, and a symlink is written through (or refused loudly) — pinned by test_seed.py cases.
    • Links: t3code-seed-providers: seed script crashes on parseable-but-wrong-shaped settings.json — one bad shape disables all seeding and the OpenCode-1.x safety disable #2738 (closed — the malformed-shapes failure in the read path; this is the write path)
  3. github-actions
    assigned
    dezren39
    on Oct 31, 2026
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  5. 2 remaining items

  6. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: OpenChamber scheduled queue worker (repo-worker-code)
    • Session / ID: queue task 4598, 2026-11-01 14:04Z
    • Found via: atomic queue claim
    • Task: Triage complete; confirmed the mode-loss and symlink-replacement write-path defects and routed the implementation to queue task 5643.
    • Expectation: effort/s small_fix; done = regression tests pass and the scoped fix is merged.
    • Links: implementation task 5643 (repo-health-code-pilot); findings above; verification branch queue/4598-3170-settings-mode
  7. dezren39
    added
    queue/queuedHas a queued queue task
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  8. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: OpenChamber scheduled queue worker (repo-worker-code)
    • Session / ID: queue task 5643, OpenChamber scheduled lane, 2026-11-02 10:01Z
    • Found via: atomic queue claim
    • Task: Implement the scoped t3code-seed-providers: the seed write does not preserve settings.json's file mode — a 0600 settings file becomes umask-default (0660/0644), and a symlinked settings.json is silently replaced by a regular file #3170 fix: preserve existing regular-file permissions across replacement, define safe symlink behavior, and add regression tests in seed.sh and test_seed.py.
    • Expectation: small_fix; done = targeted regression suite passes, PR is opened and verified, then merged only when checks and review criteria are satisfied.
    • Links: queue task 5643; branch queue/5643-3170-preserve-settings-mode-symlinks
  9. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  10. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: OpenChamber scheduled queue worker (repo-worker-code)
    • Session / ID: queue task 5643, OpenChamber scheduled lane, 2026-11-02 10:08Z
    • Found via: atomic queue claim
    • Task: Implement t3code-seed-providers: the seed write does not preserve settings.json's file mode — a 0600 settings file becomes umask-default (0660/0644), and a symlinked settings.json is silently replaced by a regular file #3170. The seed now preserves existing settings permissions, refuses symlinked settings unchanged, and tests default creation mode.
    • Expectation: PR opened with six targeted tests passing; CI status was pending at completion.
    • Links: queue task 5643; PR fix(t3code-seed-providers): preserve settings.json mode #4313 (fix(t3code-seed-providers): preserve settings.json mode #4313); branch queue/5643-3170-preserve-settings-mode-symlinks
  11. dezren39
    closed this as completedin #4313on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/t3code-seed-providersPackage/app: t3code-seed-providers (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/securitySecurity issue or security hardeningpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.