Redesign Gene and Network types

This redesigns the Gene and Network types to be cleaner and more idiomatic. It also improves the performance of network evaluation by caching subnetwork results.
cc @wbrickner How do these changes look? It will require you to change any parts of your code that handle Gene, but the new design should be cleaner overall. Some other things to note:

The number of inputs and outputs of the network are provided by methods now.
The calculation of the number of inputs is somewhat different from what you have now. It uses one plus the max ID referred to by any Input gene instead of the number of unique inputs. I thought about this some more and realized that input IDs can be skipped in a network, resulting in the same number of unique IDs but different ID values (and therefore different indices). For example, if a network only mentions inputs 2 and 3, there are two unique inputs, but upon indexing a 2-length input array a panic will occur. You can fix this by adjusting the IDs to match one-to-one with the correct indices, but this PR makes cge simply require a large enough input array to match the largest possible index ([f64; 4] in the example). This keeps part of eant2's use case simple and is also good for performance because direct indexing is used.

After this PR is merged, I'll add the mutation operators, as well more extensive tests that you can duplicate for const_cge.

I can provide comments if you'd like in a little bit.
Let me examine the info about input output dimensionality etc, I need to think about this carefully. I think what I'm doing in const_cge is correct already (count unique IDs of input genes), but maybe not correct. Also, for the input index I believe I mimicked the original codebase in using the ID of the input gene.

Comments
Correctness:

I would love to see the serialization work be pushed onto serde (or something) for some better correctness guarantees using a macro/declarative serialization format (with protocol versioning ideally).  Not critical now, looks to be pretty good, it's just cumbersome and a little error prone (and brittle) to be doing string manipulation manually.
is Network::validate() used anywhere? It yields Ok(()) deterministically.
I think the rewrite of evaluate is correct.  It's easier to look at than before, but you will need to be the judge.  I think it has at least mostly equivalent behavior to the old version I've studied more closely.

API

I see you've switched over to using new structs for all the gene types + some From magic, and some higher level info methods, I like this! This is awesome, very beautiful.
it'd be really cool if we could apply something along the lines of

Network::save_to_file(&self, path: &str) => Network::to_file::<P: Into<Path>>(&self, path: P)
Network::load_from_file(&self, path: &str) => Network::from_file::<P: Into<Path>>(&self, path: P)

Performance + Scaling

I wonder if we can perform the same tasks as rebuild_neuron_info in O(1) each time updates are applied? Is the scope of possible changes to the hashmap knowable a priori? May not be worth it if it's not obvious with your domain knowledge.
Question: Is the NeuronInfo struct applicable to deduplication? Can we rely on these things to build something like topological fingerprints, capturing depth and subgenome range?  One of my desires long term, although it is likely to be overopt at this stage.
I think the function pointer approach to activation functions is not the best we can do, I think it'd be easier to understand + probably more performant on modern CPUs to replace value = activation.get_func()(sum_inputs) with value = activation.apply(sum_inputs). I propose a new implementation of Activation that is a little shorter and declares everything a bit more statically:

/// Represents which transfer function to use for evaluating neural networks.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum Activation {
    /// Maps input to output directly, as if there is no transfer function.
    Linear,
    /// Outputs 1 if input is greater than 0, 0 otherwise.
    Threshold,
    /// Outputs 1 if input is greater than 0, 0 if input is equal to 0, -1 otherwise. Useful
    /// for simple problems and boolean logic, as it only allows three possible output values.
    Sign,
    /// A non-linear function. This function is the most general, so it should be defaulted to.
    Sigmoid,
    Tanh,
    SoftSign,
    BentIdentity,
    Relu,
}

impl Activation {
    /// Apply this activation function
    pub fn apply(&self, x: f64) -> f64 {
        match self {
            Activation::Linear       => Self::linear(x),
            Activation::Threshold    => Self::threshold(x),
            Activation::Sign         => Self::sign(x),
            Activation::Sigmoid      => Self::sigmoid(x),
            Activation::Tanh         => Self::tanh(x),
            Activation::SoftSign     => Self::soft_sign(x),
            Activation::BentIdentity => Self::bent_identity(x),
            Activation::Relu         => Self::relu(x),
        }
    }

    fn linear(x: f64)        -> f64 { x }
    fn threshold(x: f64)     -> f64 { if x > 0.0 { 1.0 } else { 0.0 } }
    fn sign(x: f64)          -> f64 { if x > 0.0 { 1.0 } else if x == 0.0 { 0.0 } else { -1.0 } }
    fn sigmoid(x: f64)       -> f64 { 1.0 / (1.0 + (-x).exp()) }
    fn tanh(x: f64)          -> f64 { x.tanh() }
    fn soft_sign(x: f64)     -> f64 { x / (1.0 + x.abs()) }
    fn bent_identity(x: f64) -> f64 { (((x.powi(2) + 1.0).sqrt() - 1.0) / 2.0) + x }
    fn relu(x: f64)          -> f64 { if x > 0.0 { x } else { 0.0 } }

// ...

By the way, is there some issue with representing Activation indices as u8? I see they're often i32.
Great PR, hopefully some of these perspectives are useful! :)

* I would love to see the serialization work be pushed onto serde (or something) for some better correctness guarantees using a macro/declarative serialization format (with protocol versioning ideally).  Not critical now, looks to be pretty good, it's just cumbersome and a little error prone (and brittle) to be doing string manipulation manually.

This is the current plan. It would be nice to retain something reasonably human-writable, but I think serde should work pretty well here.

* is `Network::validate()` used anywhere? It yields `Ok(())` deterministically.

This function was removed and worked into the rebuild_network_metadata function in a later commit.

* it'd be really cool if we could apply something along the lines of

  * `Network::save_to_file(&self, path: &str)` => `Network::to_file::<P: Into<Path>>(&self, path: P)`
  * `Network::load_from_file(&self, path: &str)` => `Network::from_file::<P: Into<Path>>(&self, path: P)`

I like this better too, I'll change it when serialization/deserialization is reworked.

* I wonder if we can perform the same tasks as `rebuild_neuron_info` in O(1) each time updates are applied? Is the scope of possible changes to the hashmap knowable a priori? May not be worth it if it's not obvious with your domain knowledge.

The best we can do here is O(n) on the number of neurons in the genome, as the entire neuron_info map must be scanned and updated. It would still be much less work than a full rebuild though, so I'll do this where possible with the mutation operators.

* **Question**: Is the `NeuronInfo` struct applicable to deduplication? Can we rely on these things to build something like topological fingerprints, capturing depth and subgenome range?  One of my desires long term, although it is likely to be overopt at this stage.

That's a good idea! The neuron_info map does seem to capture all structural information except for connections, so it would be well suited to determining structural similarity in eant2. Structural identicality should be easy to check as well.

* I think the function pointer approach to activation functions is not the best we can do, I think it'd be easier to understand + probably more performant on modern CPUs to replace `value = activation.get_func()(sum_inputs)` with `value = activation.apply(sum_inputs)`. I propose a new implementation of `Activation` that is a little shorter and declares everything a bit more statically:

/// Represents which transfer function to use for evaluating neural networks.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum Activation {
    /// Maps input to output directly, as if there is no transfer function.
    Linear,
    /// Outputs 1 if input is greater than 0, 0 otherwise.
    Threshold,
    /// Outputs 1 if input is greater than 0, 0 if input is equal to 0, -1 otherwise. Useful
    /// for simple problems and boolean logic, as it only allows three possible output values.
    Sign,
    /// A non-linear function. This function is the most general, so it should be defaulted to.
    Sigmoid,
    Tanh,
    SoftSign,
    BentIdentity,
    Relu,
}

impl Activation {
    /// Apply this activation function
    pub fn apply(&self, x: f64) -> f64 {
        match self {
            Activation::Linear       => Self::linear(x),
            Activation::Threshold    => Self::threshold(x),
            Activation::Sign         => Self::sign(x),
            Activation::Sigmoid      => Self::sigmoid(x),
            Activation::Tanh         => Self::tanh(x),
            Activation::SoftSign     => Self::soft_sign(x),
            Activation::BentIdentity => Self::bent_identity(x),
            Activation::Relu         => Self::relu(x),
        }
    }

    fn linear(x: f64)        -> f64 { x }
    fn threshold(x: f64)     -> f64 { if x > 0.0 { 1.0 } else { 0.0 } }
    fn sign(x: f64)          -> f64 { if x > 0.0 { 1.0 } else if x == 0.0 { 0.0 } else { -1.0 } }
    fn sigmoid(x: f64)       -> f64 { 1.0 / (1.0 + (-x).exp()) }
    fn tanh(x: f64)          -> f64 { x.tanh() }
    fn soft_sign(x: f64)     -> f64 { x / (1.0 + x.abs()) }
    fn bent_identity(x: f64) -> f64 { (((x.powi(2) + 1.0).sqrt() - 1.0) / 2.0) + x }
    fn relu(x: f64)          -> f64 { if x > 0.0 { x } else { 0.0 } }

// ...

Makes sense to me.

By the way, is there some issue with representing Activation indices as u8? I see they're often i32.

u8 would work as well, but I think the integer conversion will be unnecessary with serde anyways.

Great PR, hopefully some of these perspectives are useful! :)

I appreciate the feedback, thanks a lot! I'll go ahead and merge this then and implement the rest of the changes in future commits.


IE8 throws error "Object doesn't support property or method 'indexOf'"

I can't find a "supported browsers" list for this script, but I'm having an issue with IE8. It throws the error:
Object doesn't support property or method 'indexOf'
You can view this in action here: http://www.weblinxinc.com/beta/oswegoil/site/index.htm

IE8 is not supported. You may try to use 2.x version for old browsers https://github.com/nolimits4web/Swiper/tree/Swiper2

Ah, thanks, I figured that was probably the case.


Nancy Sidebotham's website is unavailable

Should we remove it from the site?
http://nancysidebotham.com/
http://disclosure.caciviclab.org/#!/city/2/oakland/candidate/4

No, she listed it as her campaign site, so we should include it. It appears to be back up, in any case.


Fix #1971: document limitation on creating F-ordered arrays, and workaround

[Current coverage][cc-pull] is 87.19%

Merging [#1973][cc-pull] into [master][cc-base-branch] will not change coverage

@@             master      #1973   diff @@
==========================================
  Files           300        300
  Lines         53600      53600
  Methods           0          0
  Messages          0          0
  Branches       5547       5547
==========================================
  Hits          46738      46738
  Misses         5945       5945
  Partials        917        917

Powered by Codecov. Last updated by [276bb3f...2001a05][cc-compare]
[cc-base-branch]: https://codecov.io/gh/numba/numba/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/numba/numba/compare/276bb3f0a097e4e275cb859917d4bb68c187e3b8...2001a052c948ed208a5216e0ccc3e9979c4659d2
[cc-pull]: https://codecov.io/gh/numba/numba/pull/1973?src=pr


[component] Issues with Getting started

Description
Hello,
In the last couple of days I followed the getting started guide to simulate the opentitan design on Verilator.
I followed the instructions of https://opentitan.org/book/doc/getting_started/index.html (Getting started guide)
And then the Verilator guide: https://opentitan.org/book/doc/getting_started/setup_verilator.html (Verilator Setup)
I came to the chapter “Use Bazel to run software on a verilator simulation” and there I ran into some issues.
Firstly I had to install Bazel by myself, because there were no instructions how to install it and you never mentioned it before. I thought this was a little bit strange because the installation of the other tools are good documented, why not Bazel?
Then I installed Bazelisk and tried to continue, but from the terminal output I figured out that fusesoc is necessary. I found that very strange because you didn’t document the installation of fusesoc neither. So I installed it and tried it again.

File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/2/execroot/lowrisc_opentitan/bazel-out/k8-opt-exec-2B5CBBC6-ST-e846b08c7501/bin/util/fusesoc_build.runfiles/ot_python_deps/pypi__fusesoc/fusesoc/config.py", line 85, in init
os.makedirs(self.cache_root, exist_ok=True)
File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/external/python3_x86_64-unknown-linux-gnu/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/home/JStuessi/.cache/fusesoc'
INFO: Elapsed time: 25.326s, Critical Path: 5.24s
INFO: 179 processes: 178 internal, 1 linux-sandbox.
FAILED: Build did NOT complete successfully
//sw/device/tests:uart_smoketest_sim_verilator                  FAILED TO BUILD
Executed 0 out of 1 test: 1 fails to build.

_
So I checked the directory .cache/ and I could see that no file “fusesoc” exists… I don’t know if I should have created one and if yes then how?
Then I tried to run the tests as administrator because I thought that maybe it has no rights to create the file in user mode so I ran

sudo bazel test --test_output=streamed //sw/device/tests:uart_smoketest_sim_verilator

and got again the same error...
I have several questions. Why isn’t fusesoc in the python-requirements.txt ? Do I have to install fusesoc and bazel in a special way? And did you already encounter such an error like I showed above?
I work on Ubuntu 20.04, I have 16GB RAM so I think it should be enough for the UART Test (I think 7GB is needed).
Thank you and have a great day,
Best regards
Julien Stüssi

The fusesoc is at line 189, python-requirements.txt, and I think that is a modified version instead of a standard distribution. This modified version requires Python >= 3.7.

@julienissuts I have the same issue, do you have fixed the error?

@julienissuts I have the same problem,  do you have fixed the issue? :)
Thank you
Jeff

@desorya Thank you, yes I saw that too now ^^ thanks.
So i deinstalled fusesoc and installed the modified version with the command
pip3 install -r python-requirements.txt --user
And I could see that this time fusesoc was installed. And you were right it is a modified fusesoc from lowRisc :)
After I ran again the test but unfortunately I got the same error with the read-only file in the .cache folder...
INFO: From Compiling sw/device/lib/dif/dif_clkmgr.c:
sw/device/lib/dif/dif_clkmgr.c:238:1: warning: multi-line comment [-Wcomment]
  238 | // #define CONDITIONALLY_DO \
      | ^
INFO: From Action hw/ip/edn/data/edn_regs.h:
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [31:0]
  warnings.warn("Cannot generate a module define of type {}"
ERROR: /home/JStuessi/Documents/opentitan/hw/BUILD:35:14: FuseSoC hw/build.verilator_real [for tool] failed: (Exit 1): fusesoc_build failed: error executing command (from target //hw:verilator_real) bazel-out/k8-opt-exec-2B5CBBC6-ST-e846b08c7501/bin/util/fusesoc_build '--cores-root=.' run '--flag=fileset_top' '--target=sim' --setup --build ... (remaining 4 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Traceback (most recent call last):
  File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/707/execroot/lowrisc_opentitan/bazel-out/k8-opt-exec-2B5CBBC6-ST-e846b08c7501/bin/util/fusesoc_build.runfiles/lowrisc_opentitan/util/fusesoc_build.py", line 24, in <module>
    rc = main()
  File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/707/execroot/lowrisc_opentitan/bazel-out/k8-opt-exec-2B5CBBC6-ST-e846b08c7501/bin/util/fusesoc_build.runfiles/ot_python_deps/pypi__fusesoc/fusesoc/main.py", line 775, in main
    fusesoc(args)
  File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/707/execroot/lowrisc_opentitan/bazel-out/k8-opt-exec-2B5CBBC6-ST-e846b08c7501/bin/util/fusesoc_build.runfiles/ot_python_deps/pypi__fusesoc/fusesoc/main.py", line 761, in fusesoc
    config = Config(file=args.config)
  File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/707/execroot/lowrisc_opentitan/bazel-out/k8-opt-exec-2B5CBBC6-ST-e846b08c7501/bin/util/fusesoc_build.runfiles/ot_python_deps/pypi__fusesoc/fusesoc/config.py", line 85, in __init__
    os.makedirs(self.cache_root, exist_ok=True)
  File "/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/external/python3_x86_64-unknown-linux-gnu/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/home/JStuessi/.cache/fusesoc'
INFO: Elapsed time: 156.337s, Critical Path: 94.96s
INFO: 797 processes: 93 internal, 702 linux-sandbox, 2 local.
FAILED: Build did NOT complete successfully
//sw/device/tests:uart_smoketest_sim_verilator                  FAILED TO BUILD

Executed 0 out of 1 test: 1 fails to build.
JStuessi@EIFRWSE01442:~/Documents/opentitan$

Also if i try to run the test via this command:
bazel test --test_tag_filters=verilator --test_output=streamed //sw/device/tests:uart_smoketest
I get following error:
JStuessi@EIFRWSE01442:~/Documents/opentitan$ bazel test --test_tag_filters=verilator --test_output=streamed //sw/device/tests:uart_smoketest
WARNING: Streamed test output requested. All tests will be run locally, without sharding, one at a time
DEBUG: /home/JStuessi/Documents/opentitan/rules/autogen.bzl:151:14: NOTE: stamping is disabled, the chip_info section will use a fixed version string
WARNING:root:Closest bitstream to HEAD is afe0103e2ecdf215ddf5cd124921cb898fcddc8e.
INFO: Analyzed 12 targets (26 packages loaded, 13169 targets configured).
INFO: Found 11 targets and 1 test target...
INFO: From Action hw/top_earlgrey/alert_handler_regs.h:
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [NAlerts-1:0][NLpgWidth-1:0]
  warnings.warn("Cannot generate a module define of type {}"
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [NAlerts-1:0]
  warnings.warn("Cannot generate a module define of type {}"
INFO: From Action hw/ip/edn/data/edn_regs.h:
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [31:0]
  warnings.warn("Cannot generate a module define of type {}"
INFO: From Action hw/ip/spi_host/data/spi_host_regs.h:
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic
  warnings.warn("Cannot generate a module define of type {}"
INFO: From Action hw/top_earlgrey/alert_handler_regs.h:
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [NAlerts-1:0][NLpgWidth-1:0]
  warnings.warn("Cannot generate a module define of type {}"
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [NAlerts-1:0]
  warnings.warn("Cannot generate a module define of type {}"
INFO: From Action hw/ip/edn/data/edn_regs.h:
/home/JStuessi/Documents/opentitan/util/reggen/gen_cheader.py:215: UserWarning: Cannot generate a module define of type logic [31:0]
  warnings.warn("Cannot generate a module define of type {}"
INFO: From GenVivadoImage hw/bitstream/universal/splice-rom.update.mem:
2024-04-26 07:48:34,269 [gen_vivado_mem_image.py] Generating updatemem-compatible MEM file for ROM.
ERROR: /home/JStuessi/Documents/opentitan/hw/bitstream/universal/BUILD:29:17: SpliceBitstream hw/bitstream/universal/splice-rom.bit failed: (Exit 1): updatemem failed: error executing command (from target //hw/bitstream/universal:splice) updatemem --force --meminfo external/bitstreams/cache/afe0103e2ecdf215ddf5cd124921cb898fcddc8e/chip_earlgrey_cw340/rom.mmi --data ... (remaining 7 arguments skipped)
src/main/tools/process-wrapper-legacy.cc:80: "execvp(updatemem, ...)": No such file or directory
INFO: Elapsed time: 33.081s, Critical Path: 24.00s
INFO: 419 processes: 204 internal, 214 linux-sandbox, 1 local.
FAILED: Build did NOT complete successfully
//sw/device/tests:uart_smoketest_sim_verilator                        NO STATUS

Executed 0 out of 1 test: 1 was skipped.
JStuessi@EIFRWSE01442:~/Documents/opentitan$

Why isn't bazel installed via such a requirements file? I think thats strange because nothing is documented about installing bazel.
Thanks a lot for the help
Best regards
Julien

Hi,
I finally got the simulation working @lin-snail but I'm not sure if the solution is very smooth. I put my .cache folder to rwx for owner, group and others...
Meaning execute this command:
chmod 777 ./.cache/
This is the output I got later from the simulation, I still have some warnings but I'm not sure how severe they are.
JStuessi@EIFRWSE01442:~/Documents/opentitan$ bazel test --test_output=streamed //sw/device/tests:uart_smoketest_sim_verilator WARNING: Streamed test output requested. All tests will be run locally, without sharding, one at a time INFO: Analyzed target //sw/device/tests:uart_smoketest_sim_verilator (3 packages loaded, 1502 targets configured). INFO: Found 1 test target... INFO: From Compiling sw/device/lib/dif/dif_clkmgr.c: sw/device/lib/dif/dif_clkmgr.c:238:1: warning: multi-line comment [-Wcomment]   238 | // #define CONDITIONALLY_DO \       | ^ INFO: From Compiling Rust rlib opentitanlib (175 files): Warning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enumWarning: Could not findCargo.tomlin manifest dir:/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/328/execroot/lowrisc_opentitan/sw/host/opentitanlib/Cargo.toml.     => defaulting to num_enum`
INFO: From Action hw/ip/otp_ctrl/data/img_rma.24.vmem:
WARNING: Commandline override of lc_seed with<PHONE_NUMBER>9264397688411770949626922549663256047001778394918990008320537410392.
WARNING: Commandline override of otp_seed with<PHONE_NUMBER>2380457113239299468132194022238108125576166239904535336103582949069.

Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_clock_div-impl_0j5n47dt0/prim_clock_div.sv
Creating core file for primitive clock_div.
Core file written to /tmp/lowrisc_prim_clock_div-impl_0j5n47dt0/prim_clock_div.core
Implementations for primitive clock_gating: xilinx_ultrascale, xilinx, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_clock_gating.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_clock_gating-impl_0qfwi5pv4/prim_clock_gating.sv
Creating core file for primitive clock_gating.
Core file written to /tmp/lowrisc_prim_clock_gating-impl_0qfwi5pv4/prim_clock_gating.core
Implementations for primitive clock_inv: generic, xilinx_ultrascale
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_clock_inv.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_clock_inv-impl_0zafwupkn/prim_clock_inv.sv
Creating core file for primitive clock_inv.
Core file written to /tmp/lowrisc_prim_clock_inv-impl_0zafwupkn/prim_clock_inv.core
Implementations for primitive clock_mux2: xilinx_ultrascale, xilinx, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_clock_mux2.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_clock_mux2-impl_01nvyiyxv/prim_clock_mux2.sv
Creating core file for primitive clock_mux2.
Core file written to /tmp/lowrisc_prim_clock_mux2-impl_01nvyiyxv/prim_clock_mux2.core
Implementations for primitive flop_en: xilinx, generic, xilinx_ultrascale
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_flop_en.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_flop_en-impl_0fukamr1v/prim_flop_en.sv
Creating core file for primitive flop_en.
Core file written to /tmp/lowrisc_prim_flop_en-impl_0fukamr1v/prim_flop_en.core
Implementations for primitive ram_1p: badbit, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_ram_1p.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_ram_1p-impl_0xgq8lyh0/prim_ram_1p.sv
Creating core file for primitive ram_1p.
Core file written to /tmp/lowrisc_prim_ram_1p-impl_0xgq8lyh0/prim_ram_1p.core
Implementations for primitive ram_1r1w: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_ram_1r1w.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_ram_1r1w-impl_0c5bvtmgb/prim_ram_1r1w.sv
Creating core file for primitive ram_1r1w.
Core file written to /tmp/lowrisc_prim_ram_1r1w-impl_0c5bvtmgb/prim_ram_1r1w.core
Implementations for primitive ram_2p: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_ram_2p.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_ram_2p-impl_0sfwoukjm/prim_ram_2p.sv
Creating core file for primitive ram_2p.
Core file written to /tmp/lowrisc_prim_ram_2p-impl_0sfwoukjm/prim_ram_2p.core
Implementations for primitive rom: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_rom.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_rom-impl_0xq23yu6p/prim_rom.sv
Creating core file for primitive rom.
Core file written to /tmp/lowrisc_prim_rom-impl_0xq23yu6p/prim_rom.core
Implementations for primitive and2: xilinx_ultrascale, xilinx, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_and2.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_and2-impl_0friunawz/prim_and2.sv
Creating core file for primitive and2.
Core file written to /tmp/lowrisc_prim_and2-impl_0friunawz/prim_and2.core
Implementations for primitive buf: xilinx, xilinx_ultrascale, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_buf.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_buf-impl_03l1387xx/prim_buf.sv
Creating core file for primitive buf.
Core file written to /tmp/lowrisc_prim_buf-impl_03l1387xx/prim_buf.core
Implementations for primitive clock_buf: generic, xilinx, xilinx_ultrascale
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_clock_buf.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_clock_buf-impl_0qsqx5wam/prim_clock_buf.sv
Creating core file for primitive clock_buf.
Core file written to /tmp/lowrisc_prim_clock_buf-impl_0qsqx5wam/prim_clock_buf.core
Implementations for primitive flash: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_flash.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_flash-impl_0dd6lpdzj/prim_flash.sv
Creating core file for primitive flash.
Core file written to /tmp/lowrisc_prim_flash-impl_0dd6lpdzj/prim_flash.core
Implementations for primitive flop: xilinx, xilinx_ultrascale, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_flop.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_flop-impl_0pria5djj/prim_flop.sv
Creating core file for primitive flop.
Core file written to /tmp/lowrisc_prim_flop-impl_0pria5djj/prim_flop.core
Implementations for primitive otp: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_otp.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_otp-impl_0uo270o_d/prim_otp.sv
Creating core file for primitive otp.
Core file written to /tmp/lowrisc_prim_otp-impl_0uo270o_d/prim_otp.core
Implementations for primitive pad_attr: xilinx, generic, xilinx_ultrascale
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_pad_attr.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_pad_attr-impl_0kd8xbaoa/prim_pad_attr.sv
Creating core file for primitive pad_attr.
Core file written to /tmp/lowrisc_prim_pad_attr-impl_0kd8xbaoa/prim_pad_attr.core
Implementations for primitive pad_wrapper: xilinx_ultrascale, xilinx, generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_pad_wrapper.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_pad_wrapper-impl_0154ikeil/prim_pad_wrapper.sv
Creating core file for primitive pad_wrapper.
Core file written to /tmp/lowrisc_prim_pad_wrapper-impl_0154ikeil/prim_pad_wrapper.core
Implementations for primitive usb_diff_rx: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_usb_diff_rx.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_usb_diff_rx-impl_0x9i2cugx/prim_usb_diff_rx.sv
Creating core file for primitive usb_diff_rx.
Core file written to /tmp/lowrisc_prim_usb_diff_rx-impl_0x9i2cugx/prim_usb_diff_rx.core
Implementations for primitive xnor2: generic
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_xnor2.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_xnor2-impl_05wjn46_v/prim_xnor2.sv
Creating core file for primitive xnor2.
Core file written to /tmp/lowrisc_prim_xnor2-impl_05wjn46_v/prim_xnor2.core
Implementations for primitive xor2: xilinx, generic, xilinx_ultrascale
Inspecting generic module /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/sandbox/linux-sandbox/227/execroot/lowrisc_opentitan/hw/ip/prim_generic/rtl/prim_generic_xor2.sv
No module named 'google_verible_verilog_syntax_py'
Verible parser failed, using regex fallback instead.
Creating SystemVerilog module for abstract primitive
Abstract primitive written to /tmp/lowrisc_prim_xor2-impl_0s1hrdrqh/prim_xor2.sv
Creating core file for primitive xor2.
Core file written to /tmp/lowrisc_prim_xor2-impl_0s1hrdrqh/prim_xor2.core
Invoking test: sw/host/opentitantool/opentitantool --rcfile= --logging=info --interface=verilator --verilator-bin=hw/build.verilator_real/sim-verilator/Vchip_sim_tb --verilator-rom=sw/device/lib/testing/test_rom/test_rom_sim_verilator.39.scr.vmem --verilator-otp=hw/ip/otp_ctrl/data/img_rma.24.vmem --verilator-flash=sw/device/tests/uart_smoketest_sim_verilator.64.vmem --exec=console --non-interactive --exit-success='PASS.\n' --exit-failure='((FAIL|FAULT).\n)|(BFV:[0-9a-f]{8})' no-op
[2024-04-29T12:11:27Z INFO  opentitanlib::transport::verilator::subprocess] CWD: Ok("/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan")
[2024-04-29T12:11:27Z INFO  opentitanlib::transport::verilator::subprocess] Spawning verilator: "hw/build.verilator_real/sim-verilator/Vchip_sim_tb" "--meminit=rom,sw/device/lib/testing/test_rom/test_rom_sim_verilator.39.scr.vmem --meminit=flash0,sw/device/tests/uart_smoketest_sim_verilator.64.vmem --meminit=otp,hw/ip/otp_ctrl/data/img_rma.24.vmem"
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] Simulation of OpenTitan Earl Grey
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] =================================
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] Tracing can be toggled by sending SIGUSR1 to this process:
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ kill -USR1 10568
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] TOP.chip_sim_tb.u_dut.top_earlgrey.u_flash_ctrl.u_eflash.u_flash.gen_generic.u_impl_generic.gen_prim_flash_banks[0].u_prim_flash_bank.unnamedblk1: ReadLatency:1 ProgLatency:50 EraseLatency:200
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] TOP.chip_sim_tb.u_dut.top_earlgrey.u_flash_ctrl.u_eflash.u_flash.gen_generic.u_impl_generic.gen_prim_flash_banks[1].u_prim_flash_bank.unnamedblk1: ReadLatency:1 ProgLatency:50 EraseLatency:200
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]                    0GPIO: creating gpiodpi
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] GPIO: FIFO pipes created at /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-read (read) and /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-write (write) for 32-bit wide GPIO.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] GPIO: To measure the values of the pins as driven by the device, run
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ cat /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-read  # '0' low, '1' high, 'X' floating
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] GPIO: To drive the pins, run a command like
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ echo 'h09 l31' > /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-write  # Pull the pin 9 high, and pin 31 low.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ echo 'wh10' > /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-write  # Pull pin 10 high through a weak pull-up.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] SPI: Created /dev/pts/2 for spi0. Connect to it with any terminal program, e.g.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ screen /dev/pts/2
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] NOTE: a SPI transaction is run for every 4 characters entered.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] SPI: Monitor output file created at /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/spi0.log. Works well with tail:
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ tail -f /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/spi0.log
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] USBDPI: Monitor output file created at /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/usb0.log. Works well with tail:
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ tail -f /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/usb0.log
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] UART: Created /dev/pts/3 for uart0. Connect to it with any terminal program, e.g.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] $ screen /dev/pts/3
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] UART: Additionally writing all UART output to 'uart0.log'.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] JTAG: Virtual JTAG interface dmi0 is listening on port 44853. Use
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] OpenOCD and the following configuration to connect:
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]   interface remote_bitbang
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]   remote_bitbang_host localhost
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]   remote_bitbang_port 44853
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout] Simulation running, end by pressing CTRL-c.
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::subprocess::stdout]
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::transport] Verilator started with the following interfaces:
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::transport] gpio_read = /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-read
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::transport] gpio_write = /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/gpio0-write
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::transport] uart = /dev/pts/3
[2024-04-29T12:11:28Z INFO  opentitanlib::transport::verilator::transport] spi = /dev/pts/2
[2024-04-29T12:11:28Z INFO  opentitanlib::io::uart] set_flow_control to false
�I00001 test_rom.c:158] kChipInfo: scm_revision=54697461
I00002 test_rom.c:230] Test ROM complete, jumping to flash (addr: 20000480)!
I00001 ottf_main.c:154] Running sw/device/tests/uart_smoketest.c
I00002 ottf_main.c:109] Finished sw/device/tests/uart_smoketest.c
I00003 status.c:28] PASS!
[2024-04-29T12:12:39Z INFO  opentitantool::command::console] ExitSuccess("PASS!\r\n")
[2024-04-29T12:12:39Z INFO  opentitantool] Command result: success.
[2024-04-29T12:12:39Z INFO  opentitantool] Command result: success.
INFO: Elapsed time: 1036.655s, Critical Path: 1030.14s
INFO: 375 processes: 45 internal, 328 linux-sandbox, 2 local.
INFO: Build completed successfully, 375 total actions
//sw/device/tests:uart_smoketest_sim_verilator                           PASSED in 71.9s
Executed 1 out of 1 test: 1 test passes.
JStuessi@EIFRWSE01442:~/Documents/opentitan$ find ~/.cache/bazel -name "trace_core_00000000.log"
/home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/trace_core_00000000.log
JStuessi@EIFRWSE01442:~/Documents/opentitan$ gedit /home/JStuessi/.cache/bazel/_bazel_JStuessi/babbdb84fbabb5f19400ee8587d81374/execroot/lowrisc_opentitan/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/tests/uart_smoketest_sim_verilator.bash.runfiles/lowrisc_opentitan/trace_core_00000000.log
JStuessi@EIFRWSE01442:~/Documents/opentitan$
`
Thanks for the help and if you know a better solution please let me know.
Best regards
Julien

@julienissuts I am also getting the Read-only file system error. I tried setting my .cache folder to 777 permissions, but I still get the same error. Does anyone have another solution to this error?


Implement SIF pool variable initializers in class fileout for class vars with literal values

The Smalltalk Interchange Format defined in the ANSI Smalltalk standard includes an initializer
syntax for pool variables. Using this mechanism to initialize class variables in the fileout immediately
after the class definition will have a few advantages:

The values can be set before the rest of the code is compiled. This means there are less likely to be ordering dependency issues during boot when modifying base class code that is used in the boot process.
Class vars are often used for local constants and the variable binding is only ever written to during class initialization, so always accessing the value through the indirection of the variable binding is inefficient. The compiler will generate a direct reference to the value for constant variable bindings, but
it does not know that some class variables are constants, and there is no way to mark them as constant early enough (which is why Character class>>initialize recompiles all the Character methods!)
Many class initialize methods will no longer be needed.

The SIF format is more complex than needed as it is intended for creating a complete program description. I'll borrow some ideas for it, but not use the exact format. SIF export/import could be implemented for interchange if desired.

Done, for consts with literal format only.


[feat]: custom scrollbar css

Allow users to write custom scrollbar css which will be stored in the browser's sync storage (so that it is replicated to other devices if the user has sync enabled). The CSS can either be customized from a popup or a page (say /settings) or both.

Hey, can I take this one?

Hey, can I take this one?

Ya sure

This issue is not assigned to anyone as of now. Let me know if you want to work on it

Can you assign me?

Can you assign me?

yes

@krishguptadev working on this ?
if not can I work on it have not had a :green_square: since a long time

@krishguptadev working on this ? if not can I work on it have not had a green_square since a long time

@krishguptadev has taken this up currently. i will let you know in case it is vacant. In the meantime, you can also look at #2

@qwe123coder I haven't started yet, If you'd like to work on this issue, feel free to, but please inform me, whether you are working or not today... I'll take another issue in this repo.

@qwe123coder I haven't started yet, If you'd like to work on this issue, feel free to, but please inform me, whether you are working or not today... I'll take another issue in this repo.

cool i can work on this

@qwe123coder I haven't started yet, If you'd like to work on this issue, feel free to, but please inform me, whether you are working or not today... I'll take another issue in this repo.

cool i can work on this

Sure, I have assigned it to you

@qwe123coder  Hey are you working on it? If not then please let me contribute.

@qwe123coder Hey are you working on it? If not then please let me contribute.

As it has been over a month, I am going to assign it to you. @qwe123coder has already made a pr #8 which did a part of this. He has also opened a draft pr #9 (with no activity for over a month) as well if you want it for reference. Happy contributing!!!

Thanks for assigning me


Contextualize errors for better debugging

Changes

Wrap errors with a contextual label
In some cases, don't return both a value and an error (would like confirmation, ultimately, but that makes a response that's confusing to interpret)

Testing

Swapped images on kc-niko cluster and confirmed things work
Added a fake error and confirmed that the label is printed in logs

lgtm

Can we also go directly to master btw


statistics report shows all gateways of a mgmt if any gw for a mgmt was selected

consolidate into #600


Add bash completion

🎉 New feature
Part of https://github.com/gazebosim/gz-tools/issues/1
Used together with https://github.com/gazebosim/gz-tools/pull/87
Summary
Bash completion for fuel tools
Test it
$ . install/share/bash-completion/completions/ign
$ ign fuel d<tab>

Checklist

[ ] Signed all commits for DCO
[ ] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@osrf-jenkins run tests please


Mixed Content issue

Steps to reproduce

Go here - https://www.comptoir-hardware.com/actus/software-pilotes/40867-windows-core-os-le-systeme-dexploitation-fantome-refait-parler-de-lui.html

Expected behavior

local.adguard.com should be loaded over HTTPS.
Actual behavior

local.adguard.com is loaded over HTTP and it's blocked due to mixed content.
Screenshot:

Your environment

AdGuard for Windows Version 7.4 nightly 2 (build 3088, CL 1.5.170)

Page itself has mixed content, and broken even without AdGuard.


Fixed performance issue, added option to count full potions only

Is changing the config group intentional? You will effectively be setting everyone on the default config

Oops, good catch

Could you also remove this unused field https://github.com/mrchooch/potion-bars/blob/dd2197a0b904c95ee46be67715288886865365d4/src/main/java/com/potionbar/PotionBarPlugin.java#L30 (also unnecessary given @Slf4j)


[$500] Login - Text in the login field is clipped when device font size is set to minimum

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number:  1.3.90-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Launch New Expensify app
Go to login page
Type glpGLPyThe content in the input field is clipped

Expected Result:
The content in the input field is not clipped.
Actual Result:
The content in the input field is clipped
This issue also happens in the many input fields across the app
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[ ] Android: mWeb Chrome
[x] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

https://github.com/Expensify/App/assets/78819774/9f3b22d5-b01d-44a4-b7f5-0044dc679cf6

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01549a10dd76321155
Upwork Job ID:<PHONE_NUMBER>673346048
Last Price Increase: 2023-11-08

Proposal
Please re-state the problem that we are trying to solve in this issue.
Text in the all the input fields are clipped when device font size is set to minimum
What is the root cause of that problem?
We're using getFontScale to calculate the height of input. When the fontScale is too small, now it will smaller than the height of the font, which caused this issue.
https://github.com/Expensify/App/blob/4760f761a0645bdcc250f319be019941c8ccb811/src/styles/variables.ts#L10-L12
What changes do you think we should make in order to solve the problem?

Define a maxFontSizeMultiplier props to prevent our PixelRatio.getFontScale() get too small value, let say that it should be 0.9.
OR we can add more logic to getValueUsingPixelRatio, define a new variable called fontScale, this value will have 0.9 as minimum value.
const fontScale = PixelRatio.getFontScale() > 0.9 ? PixelRatio.getFontScale() : 0.9

What alternative solutions did you explore? (Optional)
We can also slightly increase the height of the text input to 54:
inputHeight: getValueUsingPixelRatio(54, 72),

Proposal
Please re-state the problem that we are trying to solve in this issue.
When we adjust the text size on iPhone to small, some of the letters in the login phone or email textfield get cut off.
What is the root cause of that problem?
https://github.com/Expensify/App/blob/d4d9f78be5d54e18d71b9a6c1881734dea3e7780/src/styles/variables.ts#L11
Uses PixelRatio.getFontScale() which is only implemented on android according to their comment.  In iOS it always returns the default pixel ratio.
Here is a snippet from the react native code:
    /*
        Returns the scaling factor for font sizes. This is the ratio that is
        used to calculate the absolute font size, so any elements that
        heavily depend on that should use this to do calculations.

        If a font scale is not set, this returns the device pixel ratio.

        Currently this is only implemented on Android and reflects the user
        preference set in Settings > Display > Font size,
        on iOS it will always return the default pixel ratio.
        */
    getFontScale(): number;

What changes do you think we should make in order to solve the problem?
Write code specific for IOS that would get the appropriate font scale.  We could use the react-native-dynamic-fonts library, or write some native code to get the value we are looking for and properly size the components.
What alternative solutions did you explore? (Optional)

@Santhosh-Sellavel what do you think of the proposals we have so far?

Santhosh is partially OOO and I expect hasn't had the opportunity to review this yet. This is not a super urgent issue so I'm going to keep him assigned

Asked in slack if Santhosh is back

I'm still 50% so can you please unassign and reassign a new C+ as it has proposal already, thanks!

Assigning new C+ 🙏

Reviewing today

As far as I understand this issue is only reproducible when you change text size of your phone from settings. I reproduced it by going to  Settings > Display & brightness > text size and setting it to smallest measure.
@sonialiap is this case supported by our app and should it be fixed?

Proposal
Please re-state the problem that we are trying to solve in this issue.
The text of the input field is clipped when the device font size is set to minimum.
What is the root cause of that problem?
The TextInput height and fontSize are scaled based on PixelRatio.getFontScale(), but the paddingTop and paddingBottom properties are not scaled, which causes the text to have the wrong vertical alignment and get cut. The paddingTop and paddingBottom properties are responsible for the vertical position of the text in the TextInput.
The below example reproduces the issue outside of Expensify/App project:
import {
  StyleSheet,
  TextInput,
  PixelRatio,
} from 'react-native';

function getValueUsingPixelRatio(defaultValue, maxValue) {
  const scaledSize = PixelRatio.getFontScale() * defaultValue;
  return scaledSize > maxValue ? maxValue : scaledSize;
}

const fontSize = getValueUsingPixelRatio(15, 21);
const inputHeight = getValueUsingPixelRatio(52, 72);
const paddingBottom = getValueUsingPixelRatio(8, 10)
const paddingTop = getValueUsingPixelRatio(23, 23)

// DOES NOT WORK
const inputStyles = {height: inputHeight, fontSize, paddingBottom: 8};

// WORKS
// const inputStyles = {height: inputHeight, fontSize, paddingBottom, paddingTop};

function TextInputExample() {
  return (
    <TextInput
      allowFontScaling={false}
      style={[styles.input, inputStyles]}
    />
  );
}

const styles = StyleSheet.create({
  input: {
    paddingTop: 23,
    paddingLeft: 0,
    lineHeight: undefined,
  }
});

Font size set to Maximum:

Before  scaling Padding
After scaling Padding

Font size set to Minimum:

Before scaling Padding
After scaling Padding

What changes do you think we should make in order to solve the problem?
The issue is fixed by scaling the padding top and bottom based on the PixelRatio.getFontScale(). The properties paddingTop and paddingBottom determine the vertical position of the text, they need to be scaled with the height and fontSize to correctly position the Text in the TextInput.

Small Font
Big Font

What alternative solutions did you explore? (Optional)
I investigated the react-native iOS implementation of allowFontScaling which modifies the lineHeight and fontSize of the TextInput to correctly scale them to the new font size:

Updates the lineHeight based on the new multiplier
Changes the fontSize (effectiveFontSize and updateFontSize) based on the new multiplier

These are my observation of the react-native implementation:

The react-native implementation does not update the baseline of the Text after changing the lineHeight/fontSize, there is no need to change ascent/descent when changing lineHeight.
RCTFont has thread-safety issues and must be rewritten.
The effectiveFontSizeMultiplier is calculated based on the FontMetrics using scaledValueForValue

I cannot reproduce it on android with my phone's text set to largest or smallest options. Since I cannot reproduce and Ali can only with the smallest text size possible, I agree that this seems like an edge case. I'm going to close this so that we can fry some bigger fish.


Notification not firing in release mode

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.
Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.
Bug Information
Version Number of Plugin: 2.3.3
Device Tested On: iPad
Simulator Tested On:
Version of VS: VS for Mac 7.4
Version of Xamarin: xamarin.ios 7.4
Versions of other things you are using:
nothing else
Steps to reproduce the Behavior
Add plugin,  subscribe to onReceiveNotification, deploy app on release mode, send Push Notification (Data Message)
Expected Behavior
Fire onReceiveNotification when receives message in background
Actual Behavior
Doesn't fire but once i open the app all of them I sent starts showing up. It only does this on release and works fine in debug mode
Code snippet
Screenshots

Did you uninstall the debug app before running in release or increase the build number?

I uninstalled it but didn'tdo an incremental build. Could that be a reason?
On Sunday, February 11, 2018, Rendy Del Rosario<EMAIL_ADDRESS>wrote:

Did you uninstall the debug app before running in release or increase the
build number?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CrossGeeks/FirebasePushNotificationPlugin/issues/104#issuecomment-364708352,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APrsyyYLoAFS9CQoiZ0FMp41x5e1DUa_ks5tTjV5gaJpZM4SA7Ri
.

Are you using HTTP/2 Token based or certificates to configure Apple APS?

Try installing:
https://www.nuget.org/packages/Plugin.FirebasePushNotification/2.2.7
If doesn't solve your issue please reopen this ticket.


key? vs keys.include?

Can one make the argument that given a hash my_hash it is a better style to write:
my_hash.key? some_value

instead of
my_hash.keys.include? some_value

? If yes - I have a question towards the more experienced among you - how hard is implementing such a check? With some help from you, I would volunteer to submit such a PR.

Actual behavior
Describe here what actually happened.
Steps to reproduce the problem
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of rubocop -V. Here's an example:
$ rubocop -V
0.16.0 (using Parser 2.1.2, running on ruby 2.0.0 x86_64-darwin12.4.0)

If yes - I have a question towards the more experienced among you - how hard is implementing such a check? With some help from you, I would volunteer to submit such a PR.

It's definitely better and it's trivial to implement. But as with all similar checks - there's some potential for false positives. After all you never know whether my_hash is really a hash.


Update<EMAIL_ADDRESS>from 2.18.1

This is the latest version of pre-commit we can go to till we go beyond python 3.8, as pre-commit 3.6.0 drops python<3.9 support.
Changes

Update<EMAIL_ADDRESS>from 2.18.1
Update pre-commit config to set default python version and exclude migrations from linting.

How to test this PR

./backend.sh
pre-commit run --all-files should have no changes and pass.

This is the latest version of pre-commit we can go to till we go beyond python 3.8, as pre-commit 3.6.0 drops python<3.9 support.

Pre-commit doesn't have to run on the version of Python we have to use for cf.gov. But I'm not sure if that adds too much complexity to our local setup.

exclude migrations from linting

Actually, this should already happen through the black, isort, and ruff config. Are you seeing migration files being linted on commit?

Actually, this should already happen through the black, isort, and ruff config. Are you seeing migration files being linted on commit?

If you run pre-commit run --all-files it'll lint the migration files. Adding the exclude to the config removes it from that use-case.

Huh. Ok, well. No harm in a little more repetition.


LLM: Add llm subsystem

Very rough draft for early review
Motivation
For Pyris V2 we need a robust and extendable subsystem for handling LLMs. This system will support different LLM selection strategies in the future, which are all accessible through the same Interface.
Description
Class Diagram:

Explanation:

The RequestHandlerInterface is the entrypoint / Facade for the entire subsystem
The BasicRequestHandler is the first simple implementation of it, which simply forwards to one specified LLM
In the future different request handlers would implement different logic for switching between multiple LLMs
An IrisMessage is our own message format, which we can then convert to/from e.g. Langchain messages

Currently only has role and text, but in the near future also supports images and possibly more

The LlmManager is a singleton, which stores/handles all the different LLMs
The different LlmWrapperInterfaces and their implementations are the direct connection to the LLMs and handle any vendor specific logic (i.e. converting messages)

There is also the follow up #52 to improve the config file parsing

Can we change the model in Basic request Handler from str to Enum?

For Futur's work, maybe change the model to enum

This is not possible, as it is an identifier from a config fille. The model identifier is therefore dynamic


Can Systemd 247 "credentials" logic solve secret management for us?

Issue description
Configuring credentials in NixOS is an unsolved problem, since saving them in the nix store is a bad idea (it is world-readable on a system).
A solution would be to store it outside the nix store, as state on disk (like linux user passwords), in best case with permissions, so only the service that needs it can access it.
Maybe the new "credentials" logic from Systemd 247 can solve it for us?

A new "credentials" logic has been added to system services. This is
a simple mechanism to pass privileged data to services in a safe and
secure way. It's supposed to be used to pass per-service secret data
such as passwords or cryptographic keys but also associated less
private information such as user names, certificates, and similar to
system services. Each credential is identified by a short user-chosen
name and may contain arbitrary binary data. Two new unit file
settings have been added: SetCredential= and LoadCredential=. The
former allows setting a credential to a literal string, the latter
sets a credential to the contents of a file (or data read from a
user-chosen AF_UNIX stream socket). Credentials are passed to the
service via a special credentials directory, one file for each
credential. The path to the credentials directory is passed in a new
$CREDENTIALS_DIRECTORY environment variable. Since the credentials
are passed in the file system they may be easily referenced in
ExecStart= command lines too, thus no explicit support for the
credentials logic in daemons is required (though ideally daemons
would look for the bits they need in $CREDENTIALS_DIRECTORY
themselves automatically, if set). The $CREDENTIALS_DIRECTORY is
backed by unswappable memory if privileges allow it, immutable if
privileges allow it, is accessible only to the service's UID, and is
automatically destroyed when the service stops.

Source: https://github.com/systemd/systemd/blob/6706384a89ae0c462e7172588c80667190c4d9e2/NEWS#L320
Update: Turns out this feature was added because of the discussions in https://github.com/NixOS/rfcs/pull/59#issuecomment-624723733. So the answer is probably yes!
cc @flokli @Mic92 @aanderse @arianvp @edolstra @shlevy @d-goldin @globin
Thanks to @poettering for making this possible!
Related:

https://github.com/NixOS/nixpkgs/issues/24288
https://github.com/NixOS/nixpkgs/pull/64951
https://github.com/NixOS/nixpkgs/pull/102355
https://github.com/NixOS/rfcs/pull/5
https://github.com/NixOS/rfcs/pull/59
https://github.com/NixOS/rfcs/pull/59#issuecomment-629638585
https://github.com/systemd/systemd/pull/16568
https://github.com/systemd/systemd/issues/15778

I thought about the issue for 7 minutes.

When Nix is a package manager, why put your credentials into "packages"? A debian package maintainer wouldn't put his login into the package, so every debian user is logged in as him. Why can't Nix differentiate between packages and configuration?
When Nix could put configuration files in the nix store with access rights only for the service that needs it (and root for debugging) AND not share those files, the problem would be also solved.

Then the credentials won't have to be state and the configuration is reproducible again.

also related: https://github.com/NixOS/nixpkgs/pull/93659

Also related: https://github.com/Mic92/sops-nix/pull/39#pullrequestreview-522935369

I did some testing with a conf akin to the following
        serviceConfig = {
          LoadCredential = "secret_key_base:/run/secrets/unionBlue.secret_key_base";
        };
        environment = {
          SECRET_KEY_BASE = "$CREDENTIALS_DIRECTORY/secret_key_base";
        };

having the /run/secrets being populated with agenix.
Having confirmed that the /run/secrets/unionBlue.secret_key_base was populated, I still get the following error
72670]: union-blue.service: Failed to set up mount namespacing: /run/systemd/unit-root/run/credentials/union-blue.service: No such file or directory
72670]: union-blue.service: Failed at step NAMESPACE spawning /nix/store/sxpb7vbxx1kwprnhsvr2cn7l0vssl9r2-union-0.0.1/bin/union: No such file or directory

I'm not sure how to proceed next. I'm interested in testing if anybody has ideas.

@happysalada you could ask upstream (systemd) how the feature should be used in this case if the documentation is not clear. maybe something is still missing which they can add

submitted https://github.com/systemd/systemd/issues/19604
Will update when I have a working example

@happysalada @mjlbach I'm pretty sure these failures are just a problem with how NixOS tests are run. If you try it with e.g. https://github.com/Mic92/nixos-shell there is no problem.

What do you mean nixos tests? For that referenced issue I was not using the test that I wrote for dendrite, but trying to start the service.

You're right, I messed up when testing the configuration.

just to give a summary of what happened.
It seems that the loadCredential feature doesn't work with systemd 247, but people have reported that it's fixed with 248. There is a PR pending that updates to systemd 248 https://github.com/NixOS/nixpkgs/pull/123476
the systemd people advise not using environment variables for secrets at all. Meaning that any application written to get  secrets (database password for example) from environment variables should be modified to read it from a file instead. To me it seems that this is going to need some work with upstream packages to change the behavior. It seems that some settings like db passwords are most often read from env vars, while things from cert files is most often a file. I'm curious to see how upstream maintainers will react to those proposed changes.
Regarding usage it's a little odd to me, but it seems the way to use this will be pass a file coming from run/secrets. Meaning doing traditional secret management to have secrets be available in /run/secrets/my_secret and then having
serviceConfig.LoadCredential = "my_secret:/run/secrets/my_secret";
then inside your application you would have
my_secret = File.read("$CREDENTIALS_DIRECTORY/my_secret")
Please correct me, If you feel I misunderstood something.

It seems that some settings like db passwords are most often read from env vars

That is very common in Docker, maybe they made it popular.
e.g. https://github.com/docker-library/docs/blob/6b9b7ee305a055ecfe0c9c0b772bc2da176d736e/postgres/README.md#start-a-postgres-instance
it might be OK inside a container, but we should use files
thank you for bringing this topic forward!

just to give a summary of what happened.
It seems that the loadCredential feature doesn't work with systemd 247, but people have reported that it's fixed with 248. There is a PR pending that updates to systemd 248 #123476
Please correct me, If you feel I misunderstood something.

At least with current systemd in unstable (systemd-247.6), It doesn't seem to be broken anymore.
I created /run/secrets/foo in a directory only readable by root, and am able to pass this down to a restricted, DynamicUser:
root@tp:/run/secrets|⇒  systemd-run -p Type=oneshot -p DynamicUser=yes -p User=test -p LoadCredential=foo:/run/secrets/foo -t /bin/sh
Running as unit: run-u715.service
Press ^] three times within 1s to disconnect TTY.
sh-4.4$ /run/current-system/sw/bin/env
LANG=en_US.UTF-8
INVOCATION_ID=a368227532684b0ea1ed234df7bee687
USER=test
PWD=/
TERM=xterm-256color
SHLVL=1
LOGNAME=test
PATH=/nix/store/ss3pnkjknb8bc9ljdyy9wn00n0y7bxhp-systemd-247.6/bin/
CREDENTIALS_DIRECTORY=/run/credentials/run-u715.service
_=/run/current-system/sw/bin/env
sh-4.4$ /run/current-system/sw/bin/cat /run/credentials/run-u715.service/foo
bar

very silly question, how do you pass several credentials ?
it seems to me that systemd wants you to define several LoadCredential directives.
It won't work with nix right? having several LoadCredential attributes as part of serviceConfig will generate an error right?

You can assign a list
LoadCredential = [  a b c ].   We convert that to multiple directives

At least with current systemd in unstable (systemd-247.6), It doesn't seem to be broken anymore.

It is still broken. The systemd version hasn't changed since I posted https://github.com/systemd/systemd/issues/19604#issuecomment-849053534.

@dotlambda you can't reproduce the command output I posted in my comments (here and here)?
I think your issue is that in your example you want systemd to do the substitution, not a wrapper script.

@flokli Please read my comment. You have to use DynamicUser, RuntimeDirectory, and ExecStartPre to trigger the bug.

Let's carry the discussion over to https://github.com/systemd/systemd/issues/19604#issuecomment-858703583 - that's unrelated to whether systemd 247's credential logic can be used to solve secret management.
It can, as demonstrated in https://github.com/NixOS/nixpkgs/issues/102397#issuecomment-858574881, it just requires some wrapper scripts for services not supporting reading secrets from files, and assembling these files with environment variables passed at runtime - so closing this issue.

Just an additional note that I tried to run this on the systemd 247.6 without DynamicUser. ExecStartPre and LoadCredentials seem to be enough to trigger the bug (for me).
I just wanted to test passing several LoadCredentials to a service.
It seems that the credentials don't show when you run systemctl show my-service perhaps it's just because of the bug. I thought I might just share this.
Just as an aside, I submitted a PR upstream to test this on plausible analytics. The PR has been merged, but they haven't released a new version. the systemd PR update on nixpkgs is not merged either, so no rush I think, just sharing my plan.

Systemd update to 249.4 just landed on unstable.
There are a couple of gotchas with using LoadCredentials but my simple testing reveal it to work well.
The gotchas are

credentials are not available in ExecPreStart
if used inside ExecStart the environment variable $CREDENTIALS_DIRECTORY should be used between {} like ${CREDENTIALS_DIRECTORY}/my_credential. Since in systemd unlike in bash / is not a variable separator.

I was thinking of writing some documentation for it, but I don't know at all where it would belong. If people know, I'm interested.

A systemd section in the nixos manual might be worth it? If that's too high
of a bar we could create a nixos.wiki page
On Tue, 5 Oct 2021, 06:49 Raphael Megzari, @.***> wrote:

Systemd update to 249.4 just landed on unstable.
There are a couple of gotchas with using LoadCredentials but my simple
testing reveal it to work well.
The gotchas are

credentials are not available in ExecPreStart
if used inside ExecStart the environment variable
$CREDENTIALS_DIRECTORY should be used between {} like
${CREDENTIALS_DIRECTORY}/my_credential. Since in systemd unlike in
bash / is not a variable separator.

I was thinking of writing some documentation for it, but I don't know at
all where it would belong. If people know, I'm interested.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NixOS/nixpkgs/issues/102397#issuecomment-934058335,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEZNIZUASFLEOA3RH4WFPDUFJ7UFANCNFSM4TGZHCAQ
.

Ok, very early design for a systemd section, feedback welcome
https://github.com/NixOS/nixpkgs/pull/142282

How is this going to work on non-NixOS hosts?

Non-NixOS hosts are not affected by this. We render systemd units only for NixOS machines. The systemd credentials system simply exposes files in a $CREDENTIALS_DIRECTORY, which the service is able to access.

I think this can be closed now?
(Note that unfortunately we cannot access credentials in ExecStartPre yet: https://github.com/systemd/systemd/issues/19604)

I agree, I think this can be closed. the credentials logic has been implemented in several modules.
Anyone can feel free to re-open if they feel this hasn't been addressed properly

the credentials logic has been implemented in several modules.

@happysalada could you link to some of them?

plausible.nix and lemmy.nix are two of them.
if you look for CREDENTIALS in nixpkgs, you can find other occurences of it

So just out of interest because I'm window-shopping for a secrets solution: now that the issue is closed, can we get a summary?

Is this used somewhere?
How is it used, what do I need to do to make the secrets available to my user/server?
How do I get the secrets to the machine that needs them?
Where is the documentation?

If you search for loadcrediential in nixpkgs youll see where it s used.
The secrets management is a whole other rabbit hole, personally i just go with agenix (it has decent documentation ).
The one problem you might run into though is that if upstream us just putting secets in env vars. Then there isnt any point in using loadcredential, whatever you do it will end up in the nix store. The best is if upstream enables loading a secret through a path, then loadcredential is the perfect solution for it. If you are packaging your own software, then using env vars that read a path is the way to go.

It would be great to have the best practices of credential handling in nixos modules documented und used in all where it is possible, to have a consistent experience.

@arianvp recently also mentioned the concept of /etc/credstore (or /run/credstore).
If you don't specify an absolute path to the secret, but only an identifier, that's where systemd credentials logic looks things up. Maybe we could align our recommendations towards that?
Is someone willing to take over @happysalada 's PR at https://github.com/NixOS/nixpkgs/pull/142282 (or at least the credentials-related parts)?


Add copywrites1

Added copywrite thank you for case histories in which permission was given.

More copywrite permissions still needed.


Add case numbers as a thing the weaver can recognize

Got lost in the rust last week

Actually looks like this might be a real error?

Thanks, I've been bad at assuming that it's just flaky most of the time. It's because we took out the screen where you say what people are in the interview, so the weaver now skips over a specific question screen that we expected to be there. Updated the tests, local tests pass. I'll wait for the action to finish, but can merge, even if the action times out again.


Refactor F-statistics code

It is very ugly now...

Solved https://github.com/abstractqqq/polars_ds_extension/pull/112


Functionality to look up account IDs based on account name

Describe the bug
The documentation states that you can reference an account ID using the following syntax:
  parameters:
   - name: TrustedAccounts
     value: {{account Management}}

This only works if there is a replacement variable in the same configuration. e.g {{AReplacementVariable}} present within the configuration.
To Reproduce
In the customizations-config.yaml declare the following variable:
auditAccountId: '{{account Audit}}'

This will result in the following error:
2024-02-05 17:00:51.456 | error | accounts-config | Account ID not found for Audit. Validate that the emails in the parameter ManagementAccountEmail of the AWSAccelerator-InstallerStack and account configs (accounts-config.yaml) match the correct account emails shown in AWS Organizations.

However, if you have a replacement variable present, it will work e.g
auditAccountId: '{{account Audit}}'
example: {{example}}

I've narrowed it down to the following code in<EMAIL_ADDRESS>const props = {
  ...
  replacementsPresent: areReplacementsPresent(),
};

...

function areReplacementsPresent() {
  // Matches lookup values excluding account lookups such as {{account Management}}
  // Account lookups do not require existence of replacements-config.yaml file
  const regex = new RegExp('{{(?!.*(account )).*}}');
  ...
}

async function validateConfig(props: {
  partition: string;
  region: string | undefined;
  enableSingleAccountMode: boolean;
  account: string | undefined;
  replacementsPresent: boolean;
}) {
  ...
  // Load accounts config
  let accountsConfig: AccountsConfig | undefined = undefined;
  try {
    accountsConfig = AccountsConfig.load(configDirPath);
    if (props.replacementsPresent) {
      await accountsConfig.loadAccountIds(props.partition, props.enableSingleAccountMode, orgsEnabled, accountsConfig);
    }
  } catch (e) {
    initErrors.push({ file: AccountsConfig.FILENAME, message: e });
  }
  ...
}

The areReplacementsPresent function will return false when the configuration file only references an account unless there is a replacement variable present in the same configuration file as stated above. This results in the validateConfig function to not call the loadAccountIds function.
Expected behavior
The loadAccountIds is called and configuration files can reference account IDs by name regardless of having used regular replacement variables.
Please complete the following information about the solution:

[x] Version: v1.6.0
[x] Region: ap-southeast-2
[x] Was the solution modified from the version published on this repository? No
[x] If the answer to the previous question was yes, are the changes available on GitHub? N/A
[x] Have you checked your service quotas for the services this solution uses? N/A
[x] Were there any errors in the CloudWatch Logs? N/A

@vongkim just wanted to put another voice behind this - came across this bug yesterday and was going to raise my own issue for it.
The comment // Matches lookup values excluding account lookups such as {{account Management}} seems to suggest that somewhere else in the code this match is performed but I don't think there is.
As a workaround for now, I've amended the regex in config-validator.ts
Before
const regex = new RegExp('{{(?!.*(account )).*}}');

After
const regex = new RegExp('{{.*(?:account\\s)?\\w+\\s*}}');

Hello @vongkim , thank you for filing an issue with the Landing Zone Accelerator team! I can confirm I was able to replicate that behavior, the team has fixed this bug and it is slated to be incorporated in the next release.
I will keep this issue open until that release is available. Thanks again for supporting the Landing Zone Accelerator!

Hi @vongkim , this has been included in our v1.7.0 release so I will be closing this issue. Thanks for supporting the Landing Zone Accelerator!


WebGL / Add support for stroke and fill in the ShaderBuilder class

This is a preparatory step to have classes like WebGLVectorLayer and WebGLVectorTileLayer similar to the WebGLPointsLayer and WebGLTileLayer, taking a style object as input instead of passing lower level shaders and attributes to their respective renderers.
I tried to make the code of the ShaderBuilder class as well as the logic for parsing a literal style more readable.
No significant changes, the only potential impacts are:

the u_sizePx uniform which was available in stroke/fill shaders is now called u_viewportSizePx for clarity

Note that I also started transcribing the style format in ol/style/flat to something equivalent that could be used for the webgl layers. This means that eventually we might drop the current symbol style format for the WebGLPointsLayer, but for now this format is still used.

Thanks for the quick review!


Google login problem

I can't login with my google account and I think the new google login screen it is a problem. Someone else is having problem?

I'm having error 500... Error 500 is an internal server error so it should be Google's fault but it's Google right?
I'm looking into it. What do you mean new google login screen?

Workaround: use optionalUrlParams: ['display', 'state'] in the providers field on your auth config class

Fixed: try using version 6.1.5, report that the bug is fixed and close this issue.
Thanks!

After I can see your suggestion I compare the URL and found that hd
parameter was a reason. I will update your version as soon as possible.
Thank you.
On Apr 27, 2017 04:12, "Ron Zeidman"<EMAIL_ADDRESS>wrote:

Fixed: try using version 6.1.5, report that the bug is fixed and close
this issue.
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ronzeidman/ng2-ui-auth/issues/88#issuecomment-297631388,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AArFB8wtXTWLT4746S5Oxqjui7mY2NQkks5r0D_1gaJpZM4NJuR_
.

I mean before I can check you suggestion I  identified that empty parameter hd was the reason behind error and I override the optional parameters and now everything works fine.
Thank you


Added animation to background

added animation to background color so the change is not abrupt but smooth.

Hey @MuratBatarayPXL, thank you very much for your contribution! Have a wonderful day!


Configurable Positioning of the Toolbar

Options to move the toolbar to the top, bottom, or both.  Same as Pagination

I will consider to implement it, thanks


[new Model] VespaG

We'd love to contribute VespaG as a new baseline model for the DMS substitutions benchmark.
You can reproduce our results as follows:

download pre-computed ESM2 embeddings from Zenodo
create & activate Conda environment from proteingym/baselines/vespag/environment.yml
run scripts/scoring_DMS_zero_shot/scoring_VespaG_substitutions.sh

Pre-computed Spearman values are also available on Zenodo, as are raw predicted scores for all mutants (training dataset used for final method: Human).
VespaG achieves an average Spearman r of 0.483 overall and a weighted average of 0.459.
Let me know if anything is missing or unclear!

Hi @aaronkollasch,
thanks for taking the time and don't worry about the delay.
Took me a bit to get back to you as well, sorry! All requested changes have been addressed now. Let me know if you need anything further!
Best,
Julius

Thank you for the PR @JSchlensok, and for the review @aaronkollasch -- merging to main!


Fix issue with realtime partition mismatch metric

Fixes the issue described in https://github.com/apache/pinot/issues/11870

Codecov Report

Merging #11871 (f7c91a9) into master (649477a) will increase coverage by 11.61%.
Report is 1 commits behind head on master.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master   #11871       +/-   ##
=============================================
+ Coverage     34.84%   46.45%   +11.61%
+ Complexity      946      938        -8
=============================================
  Files          2297     1776      -521
  Lines        124532    92988    -31544
  Branches      19245    15011     -4234
=============================================
- Hits          43395    43199      -196
+ Misses        78111    46756    -31355
- Partials       3026     3033        +7

Flag
Coverage Δ

custom-integration1
?

integration
?

integration1
?

integration2
?

java-11
?

java-21
46.45% <0.00%> (+11.73%)
:arrow_up:

skip-bytebuffers-false
46.45% <0.00%> (+11.61%)
:arrow_up:

skip-bytebuffers-true
?

temurin
46.45% <0.00%> (+11.61%)
:arrow_up:

unittests
46.45% <0.00%> (-0.21%)
:arrow_down:

unittests1
46.45% <0.00%> (-0.21%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files
Coverage Δ

...a/manager/realtime/RealtimeSegmentDataManager.java
50.66% <ø> (+0.06%)
:arrow_up:

...local/indexsegment/mutable/MutableSegmentImpl.java
0.00% <0.00%> (ø)

... and 544 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

A minor ask: Can you add a comment in the line where the metric REALTIME_PARTITION_MISMATCH is defined that it is a count of the number of records that are mismatched? It may help prevent someone from adding it back to this if statement.
Thanks, otherwise I am fine with this PR.


Feature/vmartinov/batch status

Critical Changes
Changes
Issues Closed
Community Ideas Delivered
New Metadata
Deleted Metadata

GUS WI: https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07B0000008EHvdIAG/view

@vmartinov-sforg I'm all good on this PR. Thanks!

@vmartinov-sforg & @ptewson-sfdo I added a suggestion for the shortDescription of the custom label. Thanks!

@vmartinov-sforg just FYI I added a custom label to this PR that, while technically unrelated, gets all our forward-looking translation collateral in one branch for the localization team. Happy to fill you in on details when you get back!

@vmartinov-sforg and @ptewson-sfdo I'm good to go on this PR. Thanks for adding me as a reviewer!


WechatSDK is not adapted to Swift Package Manager

I have tried to install WeChatSDK through Swift Package Manager and it is impossible.
Could you please adapt the sdk to be installed through Swift Packahe Manager?

Hi there!
We are very interested on having WeChatSDK as SPM or xcframework. Is there any chance to get an answer about when? We are having issues building the application in Debug mode with Apple M1 developers.


'textstatistics' object has no attribute 'set_lang'

I am using textstat==0.5.6 for flesch_reading_ease
I am using non English text and getting this error.
On downloading the zip I see that set_lang is not there in class textstatistics
When will there be new release which will have set_lang method

hi @pratiksha-cobiro 👋
Thank you for raising this.
I have just released versions 0.5.7 (Python2) and 0.6.0 (Python3) onto PyPi. These versions contain limited support for non-English text.


[Waiting for Nino] Send SIMS Logs to Splunk

User story:
As a SIMS application, we need to send our logs to the OCIO Security Event Monitoring to support investigations and anomalous activity.
Acceptance Criteria:

[ ] Review documentation and connect SIMS logs to OCIO SIEM
https://docs.openshift.com/container-platform/4.13/observability/logging/log_collection_forwarding/configuring-log-forwarding.html#cluster-logging-collector-log-forward-logs-from-application-pods_configuring-log-forwarding
https://developer.gov.bc.ca/docs/default/component/platform-developer-docs/docs/security-and-privacy-compliance/platform-security-tools/#logging-and-monitoring-elasticsearch-kibana-graphana-sysdig-monitor-siem-uptime-status
https://stackoverflow.developer.gov.bc.ca/questions/732/734#734
[ ] Nino has some documentation on SIEM Ingestion Points (IP/UDP)
[ ]

We may not need this as I've been advised that logs are sent to SIEM by default.

Closing as obsolete. Logs are being sent to SIEM by default.


Milestone 1

Milestone 1 Tracking Issue
The objective of Milestone 1 is to be able to feed blocks to reth via the engine API and verify that the blocks are valid.
Issues

[x] https://github.com/scroll-tech/reth/issues/24
[x] https://github.com/scroll-tech/reth/issues/4
[x] https://github.com/scroll-tech/reth/issues/40
[x] https://github.com/scroll-tech/reth/issues/7
[x] https://github.com/scroll-tech/reth/issues/5
[x] https://github.com/scroll-tech/reth/issues/12
[x] https://github.com/scroll-tech/reth/issues/38
[x] https://github.com/scroll-tech/reth/issues/37
[x] https://github.com/scroll-tech/reth/issues/35
[x] https://github.com/scroll-tech/reth/issues/69

Milestone 1 has been completed.