| Age | Commit message (Collapse) | Author |
|
cargo_bin!() macro requires CARGO_BIN_EXE_ env vars set at compile time,
which are only available in the crate that declares the binaries. Since
test_utils is a library crate it cannot use the macro, so suppress the
deprecation warning on the four functions that call cargo_bin().
|
|
to be consistent with the summary version
|
|
Complete rewrite of ngit init to support non-interactive mode by default.
Key changes:
- Implement hybrid validation (validate all args upfront, fail fast)
- Add --grasp-servers flag for specifying git servers
- Prefer --name over --identifier for better UX
- Add comprehensive validation with helpful error messages
- Support both clone and init-from-existing-repo workflows
- Add --force flag to bypass safety checks
- Update tests for new non-interactive behavior
- Add test utilities for non-interactive testing
|
|
fix breaking changes
|
|
update nix dependancies including hardcoded nightly.rustfmt
applied autofixes
|
|
This branch name cannot be attacked by brute forcing a
shorthand event id like refs/pr/<branch-name(<shorthand-event-id)
can.
|
|
|
|
send as a PR if the commit would make patches that are too big for
nostr events.
send as a PR update if the proposal is PR.
send as a PR, revising a patch root, if patches would be too big.
in tests `get_pretend_proposal_root_event` has to be a actual proposal
with a tip, rather than just a cover letter, so we have replaced it.
|
|
NIP-34 specifies patch revisions should have a `t` tag of
`root-revision` whereas we have been using `revision-root`.
this fixes it and and handles events created with the incorrect tag.
|
|
with trival breaking changes. nip05 changes will
be done seperately.
|
|
to latest available and apply fmt fixes
|
|
required running:
`cargo fix --allow-dirty --allow-staged`
`cargo clippy --fix --allow-dirty -- -D warnings`
to fix problems
and then manually fixing some too
|
|
to comply with changes in 5f45edbebe310decb06f955d95665a6ad387c6cb
|
|
it was not correctly checking for "revision-root" tag
rust-nostr v0.40 changed the sorting order so that the revision-root
may be returned first causing intermitant test failures
|
|
and fix all of the breaking changes
|
|
update the rust nightly `fmt` overlay which needs to be pinned
to a specific version (this case by date)
update formatting in main files via `cargo fmt`
|
|
publish a merge event when the commit author signature and timestamp
match patches within an open proposal
|
|
now that the remote helper uses the commit author timestamp to
determine if commit was applied from a proposal, the timestamps
in the test proposal can no longer be identical.
this makes them deterministically different based on the file name
|
|
use RelayUrl in repo_ref which I had resisted as it mutates relay
urls when printed to append a slash
|
|
to reflect the new interface and testing only nsec login
|
|
in nearly all cases 'cannot' was used when an action was tried and
failed. 'failed to' is strictly better because:
* just because the action didn't work that time doesnt mean it
cannot work
* it is better at drawing the users attention to a problem
|
|
there was a bug in `Interactor` so that reports were turned off by
default for choices.
This was embodied into the CLI tests but this turns them on in these
scenarios.
|
|
rust-nostr must have changes the order in which it
returns elements.
a proper fix would be to work out why there are duplicates!
|
|
bump all rust-nostr packages to latest issued version.
there have been some breaking changes to nip46 and this applies
these changes.
|
|
bump all rust-nostr packages
refactoring code based on breaking changes
upgrading to patched version to address signer issue:
nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq
|
|
as sqlite is depricated in rust-nostr
|
|
bump all rust-nostr packages
|
|
which potentially were only identified when a dependancy was updated
|
|
this fixed an efficency thing which meant we needed to increase
a timeout during the update which is reverted int his commit. see:
nostr:nevent1qvzqqqqx25pzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqyqg5lfwhruw4qjpnlzq0tct0swnuj9dvavz8gsq8npuyygznstw36882alm
|
|
bump all rust-nostr packages
I'm not sure I'm completely happy with allowing mutable_key_type
but it is just run inside tests
it appears that Event didn't have the Copy trait in v0.33.0 so I'm
not sure why this warning suddenly appeared
the timeout of client.get_events_of needed to be doubled which could
indicate that an ineffiency has been introduced in v0.34.0
the primary motivation for upgrading now was to get this fix:
nostr:nevent1qqsffl2ld678pjj77rh9k2g4edljmxdu6ew4lvgnglxv7jhu3ru8vvcpp4mhxue69uhkummn9ekx7mqzyzsq3hh327t0h2dq6matqn5064cgj2zanl2stkj6s0lg4t2h5dty6rm2ucm
as I suspect it is also effecting other repositories
eg nostr-profile-manager
|
|
from `prs/`.
whilst plural reflects usage of `heads` and `tags` in git refs,
singular is shorter and more reflective of usage of branch prefixes
such as `feature/` `fix/`
|
|
if binaries in git-exec-path are copied to
tmp-git-exec-path if the dir doesnt exist
some enties fail to copy which was causing the first test to hang
|
|
to avoid tests intermitantly failing when there is no problem
|
|
add a test helper function to enable the git remote helper to be run
as intended (via git) rather than calling it directly
|
|
and filters out other branches in `prs/*` namespace
|
|
because this is how git uses the git remote helper
|
|
initially we push to the first server, if successful update the
state event, then siliently push to the others and silently fail
|
|
returns head and main branch head
|
|
create test helpers and setup basic test to verifiy
fetch was ran
|
|
instead of Kind::Custom(u16) as v33 of rust-nostr introduced them
|
|
to enable improved debugging
|
|
it was so much clearer what the problem was after
abstracting reused test code
|
|
into lib which makes reading and maintaining tests easier
|
|
of proposals
this is the same fix applied to `list` tests in
bc1e9e7ff8d2c3747a7dbc3b649930ac5bc6425d but
applied to `push` and `pull`
|
|
into lib which makes reading and maintaining tests easier
|
|
to prevent accidental name conflicts. also moved to prs/* namespace
`pull` and `push` integration tests are intermitantly failing to end
at least for `push` they work when run individually but not
when run together
|
|
to avoid tests intermitantly failing when there is no problem
|
|
reworking the tests and test suite as appropriate
|
|
instead of just tagging the first maintainer's repo event and each
maintainer with a p tag
This allows for easier discoverability of the proposal when:
* the first maintainer hasn't issued a repo event
* the maintainers change over time and the single tagged repo event
is no listed as a maintainer in anyone elses repo event
|
|
and save details in git config
|
|
as config is now stored using git config and cache is conditionally
stored in local ./git folder under test conditions
|
|
so that nip46 bunker signing can be added
|
|
replace ngit yaml file config with:
* nsec / ncryptsec / npub in git config in nostr.* namespace
* sql database cache for metadata and relay events
allow different logins to be used for different git repositories by
storing login in local git config
|
|
when the non-default option correctly sent
|
|
both nostr and nostr-sdk packages and also in test_utils
fix the many breaking changes
fix: ignore trailing slash when depuplicate relays for send events.
this was picked up as TagStandard::RelayMetadata has started adding
a traling slash.
refactor cli output test function `expect_send_with_progress` so that
relays can succeed / fail in a random order
|
|
bump nostr and nostr-sdk packages and also in test_utils
remove custom ncryptsec implementation and use the newly
added implementation nip49 version in rust-nostr
note a patched v0.30 is used so that log_n is exposed so that
user can be warned it might take a few seconds to decrypt.
this has now been merged into the library.
note that this will no longer decrypt existing ncryptsec values as
it is uses a longer string. this should therefore be bundled with
the upcoming change to storing nsec and ncryptsec in git config.
|
|
in addition to being used to create a new proposal revision,
in-reply-to can now be used to reference other events and npubs.
for example an issues or kind 1 threads where the proposal is relevant
the proposal will only be marked as a revision if the first parameter is
a reference to an existing proposal root
|
|
to reflect new name in rust-nostr
|
|
update nix dependancies to latest version using default update options
|
|
when since_or_range isn't specified
adds resilience as assuming master..HEAD can cause some issues
eg when master is not up-to-date with origin/master
|
|
to enable better debugging
|
|
resolve a long standing test issue where failures to output the correct
message in the cli would result in the test never ending
rather than failing
the many test cases updated in this change are to ensure
failures are caught rather than ignored
some of them are just refactored to remove calling an extra function,
which is no longer needed
note: this doesn't fix the intermittent issue, most commonly experienced
under the nix configuration, where tests that should pass
occationally never end preventing the rest of the suite from running
|
|
so temporarly created test directories and files are ignored
|
|
instead of no default. note: I spent hours trying to get
CliTester to support default choices and gave up.
I have a stashed the attempt and am moving on...
|
|
this enables consistancy of display with simple clients that are just taking
the output of `git format-patch`
|
|
between 5 Feb 2024 and 13 Feb 2024 backtrace began activiating in
`nix-shell` and ci during integration tests when rexpect.
this caused some error tests to fail / hang
it was not activating in the `nix-shell` when the cli
was called seperately
setting the `RUST_BACKTRACE=0` in the rexpect config surpresses
the backtrace as desired
|
|
up the pr event type to a nip34-like cover letter format
this sets the building blocks in place to enable simplier clients to
use the 'cover letter' feature in `git format-patch` to create the
experience as a pr event
|
|
- change kind number
- remove "r-" prefix from unique commit id r tag
- rename tag commit-sig to commit-pgp-sig
- a tag for repo identifer and pubkey. this serves as a vote for
this pubkey being a maintainer
- add relay hints
- change format of committer tag
- remove r references to parent commit id
- tag parent patch event if its part of change request
author and commit-message tags still need to be removed but they are
required to apply patches with gitlib2. we will need to fallback to
running the git client to apply patches.
BREAKING CHANGE: change patch/commit event kind and tags to reflect
nip34 draft. events with the older kind will no longer be found and
will not be in a valid format
|
|
nip34 specifies that repo event tags with multiple values wuch as
"relays" and "web" use theformat:
`["tag", "item", "item"...]`
instead of:
```
["tag", "item"],
["tag", "item"],
```
this update also adds clarity. it is not obvious that using a p tag
is intended to make the pubkey a co-maintainer.
BREAKING CHANGE: format of maintainers tags in repo events has
changed to reflect nip34 style and ngit will not detect the old
format
|
|
- change kind number
- do not rely on d identifiers for unique commit id. set it as default
to unique commit id shorthand.
- remove "r-" prefix from unique commit id r tag and instead add checks
for SHA1 validity
- rename tag git_server to clone
- add web tag
- use single relays tag instead of multiple relay tags
BREAKING CHANGE: change repo event kind and tags to reflect
nip34 draft. events with the older kind will no longer be found and will
not be in a valid format
|
|
this is a contribution from jk (sectore) that I rebased and squashed
into this commit.
the tests were broken in the last few commits to rush out some fixes.
this change may introduce more issues because of
Relay.respond_standard_req.
|
|
to prevent tests from poluting public relays
|
|
so that it is outside the 30000 <= n < 40000 parameterized replacable
range
|
|
this doesnt effect the current tests but is more realistic
|
|
- fetch prs and present as a selectable list
- create and / or checkout branch for selected pr
- apply latest patches as commits
|
|
fetch repository reference events to identify repository relays
send pr events to repository relays alongside user relays
|
|
immediately request metadata and relay list from any newly discovered
user write relays
|
|
get user relay list and metadata events from relays when keys are
used and last fetch attempt was more than an hour ago
uses user's write relays if known, otherwise uses fallback relays
to achieve this a method for intergration testing event fetching
from relays was added
|
|
add tests but these currently don't work when run together
|
|
- identify commits
- create pull request event
- create patch events
|
|
Enables the user to only handle the nsec upon first use of the tool
by encrypting it with a password and storing it on disk in an
application cache.
The approach to encryption draws heavily from that used by the gossip
nostr client.
- unencrypted nsec is zeroed from memory
- a salt is used to defend against rainbow tables
- computationally expensive key stretching defends against
brute-force attacks of passwords with low entropy.
There is UX trade-off between decryption speed and key-stretching
computation. This UX challenge is exacerbated in a cli tool as
decryption must take place more regularly. Thought was put into the
selected n_log and a heavily reduced value is provided for long
passwords where security benefits are smaller.
A more granular reducing in computation was also considered by
rejected to avoided to revealing just how weak a password is as most
weak passwords are reused.
|
|
Create skeleton for a complete rebuild of the prototype as a production
ready product.
Includes design patterns for:
- dependency injection
- unit testing with dependency mocking
- integration testing
- error handling
- config storage
BREAKING-CHANGE: ground-up redesign with incompatible protocol standards
|