Skip to content

[Hackathon] Read ~/.testsprite/config for persistent defaults (output, endpoint, project) #100

Closed as not planned

Description

@Andy00L

Discord Username / User ID

interferon0

What does this improvement do?

There is no way to persist a default --output, --endpoint-url, or project id; every non-credential setting is flag-or-env only. The path is already half-built: defaultConfigPath() returns ~/.testsprite/config and has a unit test, but loadConfig() never reads it. Wire the config file in as the lowest-precedence layer (flag > env > config-file > built-in default), so "this repo speaks JSON to this endpoint" can be stated once. This mirrors the aws-cli split (credentials in one file, settings in another) that this repo has half-built.

Details / implementation notes

defaultConfigPath() at src/lib/config.ts:20 is defined, but loadConfig() (config.ts:35-46) resolves only flag > env > credentials file. Reuse the existing hardened INI parser parseCredentials() (src/lib/credentials.ts; null-prototype + prototype-pollution guards) to read a [default]/[profile x] section, and insert one layer into loadConfig's cascade below env. Composes with the existing TESTSPRITE_PROJECT_ID. Document the precedence and extend the DOCUMENTATION.md configuration tables. No new dependency. Tests: config-file value used when flag/env absent; flag and env override it. PR to follow once assigned.

Confirmations

  • I have searched existing issues and this is not a duplicate.
  • I have provided my Discord identity above for reward coordination.

Activity

  1. added
    needs-triage
    hackathon
    on Jul 1, 2026
  2. zeshi-du commented on Jul 3, 2026

    @zeshi-du
    Contributor

    Triage: accepted — confirmed against current source: defaultConfigPath() exists but loadConfig() never reads it, so this finishes an intended aws-cli-style credentials/config split. Precedence exactly as proposed: flag > env > config file > built-in default. Comment /assign to claim.

  3. removed
    needs-triage
    on Jul 3, 2026
  4. Andy00L commented on Jul 5, 2026

    @Andy00L
    ContributorAuthor

    PR ready here: #179

  5. Andy00L commented on Jul 5, 2026

    @Andy00L
    ContributorAuthor

    /assign

  6. added
    in-progress
    on Jul 5, 2026
  7. testsprite-hob commented on Jul 5, 2026

    @testsprite-hob

    Assigned to @Andy00L. Thanks for taking this on. ⚠️ You're now over the soft 3-issue limit (6/3). Consider finishing one before taking more.

    Your open assigned issues (6/3):

  8. added
    accepted
    on Aug 13, 2026
  9. Andy00L commented on Oct 15, 2026

    @Andy00L
    ContributorAuthor

    /unassign

  10. removed
    in-progress
    on Oct 15, 2026
  11. testsprite-hob commented on Oct 15, 2026

    @testsprite-hob

    Unassigned @Andy00L. Thanks for the update — freeing this up for someone else.

  12. OkeyAmy commented on Oct 18, 2026

    @OkeyAmy
    Contributor

    /assign

  13. testsprite-hob commented on Oct 18, 2026

    @testsprite-hob

    Assigned to @OkeyAmy. Thanks for taking this on. (1 more slot available.)

    Your open assigned issues (2/3):

  14. added
    in-progress
    on Oct 18, 2026
  15. removed
    in-progress
    on Nov 9, 2026
  16. testsprite-hob commented on Nov 9, 2026

    @testsprite-hob

    @OkeyAmy, your claim expired after 48 hours without a linked PR. This issue is open for others now, and you're welcome to /assign again if it's still free.

  17. zeshi-du commented on Nov 9, 2026

    @zeshi-du
    Contributor

    We have decided not to add a ~/.testsprite/config layer to the CLI: the endpoint, output format and project keep coming from flags, environment variables and the credentials profile. Closing as not planned (see #225 and #540). Thanks to both authors for the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedhackathon

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions