Skip to content

Commit

Permalink
Merge pull request #423 from holochain/2024-02-05-add-spell-checking-ci
Browse files Browse the repository at this point in the history
add cspell GH workflow for spell checking
  • Loading branch information
pdaoust authored Feb 9, 2024
2 parents b623682 + a54dfbf commit 86e1d21
Show file tree
Hide file tree
Showing 16 changed files with 144 additions and 26 deletions.
24 changes: 24 additions & 0 deletions .cspell/custom-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
agent-centricity
Anwaar
buildinputs
builtins
Burmeister
Cachix
CRDT
d'Aoust
fixt
gnused
IPFS
NixOS
nixpkgs
pkgs
QUIC
rustc
rustflags
rustup
subl
Tauri
Ulhaq
Wahlstrom
WebRTC
workdir
16 changes: 16 additions & 0 deletions .cspell/holochain-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DeepKey
dnas
DPKI
hApp
Holo
Holo's
Holochain
Holochain's
Holonix
sharded
Tryorama
webhapp
zome
zome's
zomes
zomes'
18 changes: 18 additions & 0 deletions .cspell/template-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
brower
coreconcepts
elif
endfor
endlayoutblock
endlink
endmacro
endrenderlayoutblock
gtag
layoutblock
MSIE
newblock
pagefind
rocketship
renderlayoutblock
srcset
storysequence
surpress
21 changes: 21 additions & 0 deletions .cspell/words-that-should-exist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
affordance
affordances
automations
birthdate
counterparties
counterparties'
counterparty
counterparty's
filesystem
filesystems
interoperating
permissioned
permissivity
runtimes
sandboxed
spacebar
todo
todos
unforgeable
uninstallation
unvalidated
19 changes: 19 additions & 0 deletions .github/workflows/spellcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Check spelling'
on: # rebuild any PRs and main branch changes
pull_request:
push:

jobs:
spellcheck: # run the action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Get dictionaries'
run: |
npm install @cspell/dict-lorem-ipsum
npm install @cspell/dict-rust
- uses: streetsidesoftware/cspell-action@v5
with:
root: 'src'
files: '**/*.{json5,njk,md}'
incremental_files_only: false
22 changes: 22 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"import": ["@cspell/dict-lorem-ipsum/cspell-ext.json", "@cspell/dict-rust/cspell-ext.json"],
"dictionaries": ["holochain", "words-that-should-exist", "custom", "template", "html", "css", "softwareTerms", "lorem-ipsum", "rust"],
"dictionaryDefinitions": [
{
"name": "holochain",
"path": "./.cspell/holochain-words.txt"
},
{
"name": "words-that-should-exist",
"path": "./.cspell/words-that-should-exist.txt"
},
{
"name": "custom",
"path": "./.cspell/custom-words.txt"
},
{
"name": "template",
"path": "./.cspell/template-words.txt"
}
]
}
2 changes: 1 addition & 1 deletion src/pages/concepts/10_countersigning.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ When Alice and Bob's conductors each receive the full set of actions, they final

Normally, counterparties publish their actions to a DHT neighborhood and hope that there are enough honest and reliable validation authorities there to collect and return a full set of signed actions to everyone. But this can put them at risk; if the neighborhood contains authorities who either are malicious, have slow network connections, or have inaccurate clocks, it's possible for some counterparties to see all signatures within the time window while others do not. This would cause some to complete the session and others to back out, leading to inconsistent state on the DHT and even apparent evidence of source chain revisions.

The problem is compounded if one counterparty is able to collude with a neighbourhood authority to collect signatures but not contribute its own signature to the session. This would cause all honest counterparties to reach the session timeout and cancel the countersigning process, only to have their full signature set revealed later when they've already written other records to their source chains, again creating apparent evidence that they've revised their source chains.
The problem is compounded if one counterparty is able to collude with a neighborhood authority to collect signatures but not contribute its own signature to the session. This would cause all honest counterparties to reach the session timeout and cancel the countersigning process, only to have their full signature set revealed later when they've already written other records to their source chains, again creating apparent evidence that they've revised their source chains.

To counter this problem, the counterparties can nominate an **enzyme**. The enzyme is typically an agent that all counterparties can trust, with no stake in the transaction, who participates in the session only as a witness. It's their job to collect all the signatures and send them to the other counterparties. The data they sign includes all signatures as well as their own. As the collector and final signer, they definitively determine whether the session was successful within the time period, and put their name to the presence of a full signature set.

Expand Down
4 changes: 2 additions & 2 deletions src/pages/concepts/11_lifecycle_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ We covered both of these callbacks in the section on [validation](../7_validatio

* An integrity zome's validation callback is called any time an entry or link whose type is defined in the zome is written to the source chain.
* The validation callback is called for every **DHT operation** produced by an action.
* The validation callback must return success, failure with an optional failure message, or 'unresolved depndencies'. If a validation callback attempts but fails to retrieve DHT data, the conductor will terminate the execution of the validation function with the 'unresolved dependencies' result.
* The validation callback must return success, failure with an optional failure message, or 'unresolved dependencies'. If a validation callback attempts but fails to retrieve DHT data, the conductor will terminate the execution of the validation function with the 'unresolved dependencies' result.
* The genesis self-check function is called at cell instantiation time, before the cell attempts to connect to the network. It's an opportunity to do a quick check on the integrity of the user-supplied **membrane proof**.

## Init callback
Expand Down Expand Up @@ -89,7 +89,7 @@ Behind the scenes, a remote signal is just a [remote call](../8_calls_capabiliti

## Key takeaways

* The entry type defintions callback tells a conductor about the entry types an integrity zome defines, but the Rust SDK generates one for you using macros.
* The entry type definitions callback tells a conductor about the entry types an integrity zome defines, but the Rust SDK generates one for you using macros.
* Validation and genesis self-check callbacks receive data for validation.
* The init callback can be used to set up initial cell state, make connections with peers, and other startup tasks.
* The post-commit callback is called after every successful zome function call that commits data.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/concepts/2_application_architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The client is like the front end of a traditional app and can be written with wh

### Conductor

![A participant's conductor hosts multiple hApps for her, mediating the connections between the hApp and her clients, as well between then hApp and other participants' conductors running the same hApp.](/assets/img/concepts/2.5-conductor.png){.sz80p} {.center}
![A participant's conductor hosts multiple hApps for her, mediating the connections between the hApp and her clients, as well as between the hApp and other participants' conductors running the same hApp.](/assets/img/concepts/2.5-conductor.png){.sz80p} {.center}

The hApp is hosted in the participant's **conductor**. It's the runtime that sandboxes and executes hApp code, handles cryptographic signing, manages data flow and storage, and handles connections both locally with clients and remotely with peers. When the conductor receives a function call, it routes it to the right function in the right hApp.

Expand Down
4 changes: 2 additions & 2 deletions src/pages/concepts/7_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Norman and Rosie add Alice to their permanent block lists and remove her data fr
Eventually, everyone knows that Alice is a 'bad actor' who has hacked her app. They all ignore her whenever she tries to talk to them, which effectively ejects her from the DHT.

!!! info What happens when an agent receives a warrant instead of data?
Currently only validation authorities permanently block authors for invalid data; a future release of Holochain will also allow non-authorities to store a warrant they've received and use it as justification for taking personal defensive action against the warranated agent. This will likely look like challenging the warranted agent to produce the potentially invalid data on first contact, then blocking them if the data is indeed valid or warranting the authority if the data is valid and the warrant is erroneous.
Currently only validation authorities permanently block authors for invalid data; a future release of Holochain will also allow non-authorities to store a warrant they've received and use it as justification for taking personal defensive action against the warranted agent. This will likely look like challenging the warranted agent to produce the potentially invalid data on first contact, then blocking them if the data is indeed valid or warranting the authority if the data is valid and the warrant is erroneous.
!!!

:::
Expand Down Expand Up @@ -211,7 +211,7 @@ There are certain validation-like things that either fall outside the constraint

A **genesis self-check** function can be defined in your integrity zomes. Its job is to 'pre-validate' an agent's membrane proof before she joins a network, to prevent her from accidentally committing a membrane proof that would forever bar her from joining the network.

This function exists because it may require DHT access to fully check the validity of a membrane proof, but the newcomer isn't yet part of the network when they attempt to publish their membrame proof action. So this function verifies as much as it can without network access.
This function exists because it may require DHT access to fully check the validity of a membrane proof, but the newcomer isn't yet part of the network when they attempt to publish their membrane proof action. So this function verifies as much as it can without network access.

If the self-check fails, the cell fails to be created and the rest of the cells in the hApp are disabled. Then an error is passed back to the system that's trying to install the app (usually this is the [Holochain Launcher](https://github.com/holochain/launcher), which will then show an error message to the user.

Expand Down
2 changes: 1 addition & 1 deletion src/pages/concepts/9_signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Signals are a fairly simple construct right now, and it's likely that your app w

## Key takeaways

* Signals allow a cell to communicate with listeners without expecting a resonse.
* Signals allow a cell to communicate with listeners without expecting a response.
* Signals can be used to avoid
* A signal doesn't have guaranteed delivery because there's no way to tell whether it's been received.
* A signal is simply a message payload consisting of arbitrary bytes.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ds/code-fences.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Multiple line

### Without Copy button

To surpress the copy buttom you can wrap the code block in a `::: output-block` container
To surpress the copy button you can wrap the code block in a `::: output-block` container

Single line
::: output-block
Expand Down
14 changes: 7 additions & 7 deletions src/pages/ds/containers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Holochain Dev Portal Design System - Code Fences
title: Holochain Dev Portal Design System - Code Fences
layout: ds-layout.njk
layoutId: ds-layout-type
pageStyleId: design-system-containers
Expand All @@ -9,13 +9,13 @@ pageStyleId: design-system-containers
To avoid the meta-ness of trying to code-fence markdown, please look at the source .md files for how to write the markdown. The browser version will serve as reference of what it will look like. Also note that most of these elements are not standard md so they will not show up in their final expression in the Github or VS Code previews.
!!!

There are a number of custom extensions to the `markdown-it-container` plugin that we have implemented.
Note: `markdown-it-container` requires that each container be specifically implemented, so you can't just use `!!! newblock` or simular.
There are a number of custom extensions to the `markdown-it-container` plugin that we have implemented.
Note: `markdown-it-container` requires that each container be specifically implemented, so you can't just use `!!! newblock` or similar.

Accept as noted attribute blocks (exp: `{#an-id .a-class target=_blank}`) will be honored and express as attributes in the resulting tag.

## Details
Render a Detail/Summary block.
Render a Detail/Summary block.
!!! details The summary text
sit amet tellus cras adipiscing enim eu turpis egestas pretium aenean pharetra magna ac placerat vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt dui ut ornare lectus sit
!!!
Expand Down Expand Up @@ -45,7 +45,7 @@ Can wrap around code fences to prevent Copy buttons form being added to the code

- ### Note
#### No Title
!!! note
!!! note
Note contents
!!!

Expand All @@ -56,7 +56,7 @@ Can wrap around code fences to prevent Copy buttons form being added to the code

- ### Info
#### No Title
!!! info
!!! info
Info contents
!!!

Expand All @@ -67,7 +67,7 @@ Can wrap around code fences to prevent Copy buttons form being added to the code

- ### Learn
#### No Title
!!! learn
!!! learn
Learn contents
!!!

Expand Down
2 changes: 1 addition & 1 deletion src/pages/ds/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layoutId: ds-layout-type
pageStyleId: design-system
---

A collection of design elements used in the Dev Portal for referenence and UX review. Not intended to be linked to in public sources.
A collection of design elements used in the Dev Portal for reference and UX review. Not intended to be linked to in public sources.

!!! note
To avoid the meta-ness of trying to code-fence markdown, please look at the source .md files for how to write the markdown. The browser version will serve as reference of what it will look like. Also note that most of these elements are not standard md so they will not show up in their final expression in the Github or VS Code previews.
Expand Down
12 changes: 5 additions & 7 deletions src/pages/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ A DNA folder is where you will put the code that defines the rules of your appli

#### Why do we use the term DNA?

In Holochain, we are trying to enable people to **choose to participate in coherent social coordination**, or interact meaningfully with each other online without needing a central authority to define the rules and keep everyone safe. To do that, we are borrowing some patterns from how biological organisms are able to coordinate coherently even at scales that social organisations such as companies or nations have come nowhere close to. In living creatures like humans, dolphins, redwood trees, and coral reefs, many of the cells in the body of an organism (trillions of the cells in a human body, for instance) are each running a (roughly) identical copy of a rule set in the form of DNA.
In Holochain, we are trying to enable people to **choose to participate in coherent social coordination**, or interact meaningfully with each other online without needing a central authority to define the rules and keep everyone safe. To do that, we are borrowing some patterns from how biological organisms are able to coordinate coherently even at scales that social organizations such as companies or nations have come nowhere close to. In living creatures like humans, dolphins, redwood trees, and coral reefs, many of the cells in the body of an organism (trillions of the cells in a human body, for instance) are each running a (roughly) identical copy of a rule set in the form of DNA.

This enables many different independent parts (cells) to build relatively consistent superstructures (a body, for instance), move resources, identify and eliminate infections, and more --- all without centralized command and control. There is no "CEO" cell in the body telling everybody else what to do. It's a bunch of independent actors (cells) playing by a consistent set of rules (the DNA) coordinating in effective and resilient ways.

Expand Down Expand Up @@ -1198,8 +1198,7 @@ Your `<main>` block should now look like this:
```svelte
<main>
{#if loading}
<div style="display: flex; flex: 1; align-items: center; justify-content: ce
nter">
<div style="display: flex; flex: 1; align-items: center; justify-content: center">
<mwc-circular-progress indeterminate />
</div>
{:else}
Expand Down Expand Up @@ -1235,8 +1234,7 @@ Now your `<main>` block should look like this:
```svelte
<main>
{#if loading}
<div style="display: flex; flex: 1; align-items: center; justify-content: ce
nter">
<div style="display: flex; flex: 1; align-items: center; justify-content: center">
<mwc-circular-progress indeterminate />
</div>
{:else}
Expand Down Expand Up @@ -1522,7 +1520,7 @@ If we now run the test again, it will pass.
TODO: SHOW RUNNING THE TEST AND IT PASSING.
What about updating comments? Remember that in Holochain, because the source-chain is an appen only ledger, updating a comment is really creating a new comment and marking the old comment as deleted. Thus, when someone updates a comment, the create validation rules will still get enforced because a new comment entry gets created.
What about updating comments? Remember that in Holochain, because the source-chain is an append-only ledger, updating a comment is really creating a new comment and marking the old comment as deleted. Thus, when someone updates a comment, the create validation rules will still get enforced because a new comment entry gets created.
### 5.2. Advanced (inspecting the actions)
Expand Down Expand Up @@ -1648,7 +1646,7 @@ The steps for publishing an app to the Launcher's app store are documented in th
If you prefer to distribute your app as a full standalone executable, you will need to bundle the Holochain runtime and your app together and take care of the necessary interactions between them. Because Holochain itself is really just a set of Rust libraries, you can of course build your own application that uses those libraries, but that's a fair amount of work. Currently there are two much simpler paths for doing this: using either the [Electron](https://www.electronjs.org/) or [Tauri](https://tauri.app/) frameworks, both of which can generate cross-platform executables from standard web UIs. These frameworks also support inclusion of additional binaries, which in our case are the [holochain conductor](https://docs.rs/holochain/latest/holochain/) and the [lair keystore](https://docs.rs/lair_keystore/latest/lair_keystore/). Though there is quite a bit of complexity in setting things up for these frameworks, all the hard work has already been done for you:

* **Electron**: Refer to the community-supported [electron-holochain-template](https://github.com/lightningrodlabs/electron-holochain-template/) repo.
* **Tauri**: See the officially supported [holochain-kanagroo](https://github.com/holochain-apps/holochain-kangaroo) repo.
* **Tauri**: See the officially supported [holochain-kangaroo](https://github.com/holochain-apps/holochain-kangaroo) repo.

Both of these are GitHub template repos with detailed instructions on how to clone the repos and add in your UI and DNA, as well as build and release commands that will create the cross-platform executables that you can then deliver to your end users.

Expand Down
Loading

0 comments on commit 86e1d21

Please sign in to comment.