test: 3524-share-consent credential count depends on the environment

Open Beginner friendly
#6,929 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
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
testing

Research direction

Read test/suite/regressions/3524-share-consent.test.ts and trace how its preview fixture reaches the generated-value check in share-entropy.ts. Identify values the entropy check sees that vary by environment, then make the test inputs deterministic. Run the named test repeatedly and confirm the preview consistently reports the credential count.

Written by the indexing model from the issue text.

Description

test/suite/regressions/3524-share-consent.test.ts > "shows the preview with the redaction counts and the gist visibility before asking" failed once in a full suite run (shard 4 of 6) and passed when run alone, 3 of 3 at the PR head and 3 of 3 at main's merge-base, in the same container image and limits.

Failure: expected 'Share this session as a secret GitHub…' to match /Removed first: .*credential/; the preview read "Removed first: 2 home paths, 1 email. Images are always left out."

Likely cause (not proven): whether the preview counts a credential depends on the generated-value check in share-entropy.ts. With tool outputs left out, a long random-looking string elsewhere in the export (for example a random temp path) is what gets counted, so the count depends on the environment. Expected: the test controls every value the entropy check sees (fixed temp paths, or a seeded fixture) so the credential count is deterministic.

Dominant language
TypeScript
Stars
517
Forks
163
Avg merge
23h 45m
Merged PRs (30d)
691

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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 code-yeongyu/senpi

All issues in code-yeongyu/senpi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.