| Age | Commit message (Collapse) | Author |
|
push 2 commits to an existing proposal
there are a lot of asserts in here but if they were split out into
their own tests the suite would take much longer to run as we are
waiting a few seconds in the test to ensure the
timestamps are different
|
|
add a test helper function to enable the git remote helper to be run
as intended (via git) rather than calling it directly
|
|
so that we can inspect the state of a test repo
|
|
and filters out other branches in `prs/*` namespace
|
|
because this is how git uses the git remote helper
|
|
listed in the announcement `clone` tag
|
|
initially we push to the first server, if successful update the
state event, then siliently push to the others and silently fail
|
|
and falls back to git server is state event cant be found
|
|
previously `recreate_as_bare` was using clone and therefore just
copying main branch
|
|
as gitlib2 cannot push to a non bare git repo in a directory
|
|
returns head and main branch head
|
|
create test helpers and setup basic test to verifiy
fetch was ran
|
|
removed in fc3f22eac2bb81823f170f61ba9d39baff76b933 as rust-nostr
made it private
attempts were made to reintroduce it in
https://github.com/DanConwayDev/ngit-cli/pull/5
finally we can close #5, the last github PR
|
|
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
|
|
applies:
nostr:note14jnggugkcf9vg42tcu6h8c842xlxacsatw7uf889xjjdtqr0ptlsfa5tyh
closes
nostr:note1mm77j27kvmkwvvvvth7w4atgjhxrydafl5jkhh7eztkx4fxq4nqq6fnd6y
|
|
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
|
|
specifiy commits or commit ranges in the
same way that `git format-patch` allows
|
|
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
|
|
- create yaml file with maintainers and relays
- add maintainers to repo event
- add current user as maintainer
- custom repo relays from cli argument
- save git-server in repo event
|
|
- 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
|
|
|
|
fix breaking changes
|
|
use a patched websocket server that releases port after x connections
enabling its use in many tests included in the same test run
|
|
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
|